diff mod_log_events_by_cpu_usage/README.md @ 5975:fe081789f7b5

All community modules: Unify file extention of Markdown files to .md
author Menel <menel@snikket.de>
date Tue, 22 Oct 2024 10:26:01 +0200
parents mod_log_events_by_cpu_usage/README.markdown@c0bc97c0ba61
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mod_log_events_by_cpu_usage/README.md	Tue Oct 22 10:26:01 2024 +0200
@@ -0,0 +1,10 @@
+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.