view mod_statistics_cputotal/mod_statistics_cputotal.lua @ 1912:24c22cbb86e4

mod_http_upload: Duplicate code from net.http.server in order send proper HEAD responses
author Kim Alvefur <zash@zash.se>
date Sun, 18 Oct 2015 17:25:14 +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
		}
	}
});