Software / code / prosody-modules
File
mod_measure_malloc/mod_measure_malloc.lua @ 6249:12a2989c7cc1
mod_limits_exception: obsolete
diff --git a/mod_limits_exception/README.md b/mod_limits_exception/README.md
--- a/mod_limits_exception/README.md
+++ b/mod_limits_exception/README.md
@@ -1,6 +1,8 @@
---
+labels:
+- Stage-Obsolete
summary: Allow specified JIDs to bypass rate limits
-...
+---
This module allows you to configure a list of JIDs that should be allowed to
bypass rate limit restrictions.
| author | Menel <menel@snikket.de> |
|---|---|
| date | Mon, 12 May 2025 10:57:17 +0200 |
| parent | 4758:b9af1ccac98b |
line wrap: on
line source
module:set_global(); local metric = require"core.statsmanager".metric; local pposix = require"util.pposix"; local allocated = metric( "gauge", "malloc_heap_allocated", "bytes", "Allocated bytes by mode of allocation", {"mode"} ); local used = metric( "gauge", "malloc_heap_used", "bytes", "Used bytes" ):with_labels(); local unused = metric( "gauge", "malloc_heap_unused", "bytes", "Unused bytes" ):with_labels(); local returnable = metric( "gauge", "malloc_heap_returnable", "bytes", "Returnable bytes" ):with_labels(); module:hook("stats-update", function () local meminfo = pposix.meminfo(); if meminfo.allocated then allocated:with_labels("sbrk"):set(meminfo.allocated); end if meminfo.allocated_mmap then allocated:with_labels("mmap"):set(meminfo.allocated_mmap); end if meminfo.used then used:set(meminfo.used); end if meminfo.unused then unused:set(meminfo.unused); end if meminfo.returnable then returnable:set(meminfo.returnable); end end);