mod_statistics_cputotal/mod_statistics_cputotal.lua
author Kim Alvefur <zash@zash.se>
Sun, 03 Dec 2023 23:44:18 +0100
changeset 5770 b8a2b3ebe792
parent 1386 4557ac5c205d
permissions -rw-r--r--
mod_http_oauth2: Return validation output added in trunk rev 72d7830505f0 It's not fun at all to try to register a client and only get back "failed schema validation", this should help with that.

-- 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
		}
	}
});