view mod_statistics_cputotal/mod_statistics_cputotal.lua @ 5337:8d8e85d6dc91

mod_http_oauth2: Support OpenID UserInfo claims Actually filling in those details is left to another module because I don't really wanna mix in a dependency on PEP or mod_vcard here, those implementation details can be in a second module. Some might want to fill this from LDAP or something as well.
author Kim Alvefur <zash@zash.se>
date Mon, 10 Apr 2023 10:49:02 +0200
parents 4557ac5c205d
children
line wrap: on
line source

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