view mod_statistics_cputotal/mod_statistics_cputotal.lua @ 4518:073f5397c1d2

mod_rest: Replace most mappings by using util.datamapper All the stuff now goes into a JSON file that describes the mappings.
author Kim Alvefur <zash@zash.se>
date Sun, 21 Mar 2021 23:54:06 +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
		}
	}
});