File

mod_statistics_cputotal/mod_statistics_cputotal.lua @ 5639:1664bd4c274b

mod_invites_api: refactor to keep consistent error message.
author Trần H. Trung <xmpp:trần.h.trung@trung.fun>
date Mon, 31 Jul 2023 16:41:48 +0700
parent 1386:4557ac5c205d
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
		}
	}
});