view mod_statistics_cputotal/mod_statistics_cputotal.lua @ 5705:9bbf5b0673a2

mod_audit: Fix use of util.ip Yes, weirdly named 'new' function
author Kim Alvefur <zash@zash.se>
date Mon, 13 Nov 2023 11:36:56 +0100
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
		}
	}
});