view mod_statistics_cputotal/mod_statistics_cputotal.lua @ 3946:2a5b42e4db07

mod_rest/README: Fix adhoc example Listing commands is done with disco#items, not disco#info
author Kim Alvefur <zash@zash.se>
date Sun, 15 Mar 2020 23:02:58 +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
		}
	}
});