mod_statistics_cputotal/mod_statistics_cputotal.lua
author Kim Alvefur <zash@zash.se>
Sat, 02 Mar 2024 14:47:09 +0100
changeset 5855 dde9d21a599f
parent 1386 4557ac5c205d
permissions -rw-r--r--
mod_traceback: Hook signal via event instead of directly Safer this way, see Prosody trunk rev 69faf3552d52

-- Provides total CPU time, useful for DERIVE

module:set_global();

module:provides("statistics", {
	statistics = {
		cpu_total = { -- milliseconds of CPU time used
			get = function()
				return os.clock() * 1000;
			end
		}
	}
});