mod_log_events_by_cpu_usage/README.markdown
author Matthew Wild <mwild1@gmail.com>
Tue, 18 Jan 2022 17:01:18 +0000
changeset 4880 0f5f2d4475b9
parent 3620 c0bc97c0ba61
permissions -rw-r--r--
mod_http_xep227: Add support for import via APIs rather than direct store manipulation In particular this transitions PEP nodes and data to be imported via mod_pep's APIs, fixing issues with importing at runtime while PEP data may already be live in RAM. Next obvious candidate for this approach is rosters, so clients get immediate roster pushes and other special handling (such as emitting subscribes to reach the desired subscription state).

This module logs events where more than a certain amount of CPU time was
spent.

``` lua
log_cpu_threshold = 0.01 -- in seconds, so this is 10 milliseconds
```

Uses the Lua
[`os.clock()`](http://www.lua.org/manual/5.2/manual.html#pdf-os.clock)
function to estimate CPU usage.