File

mod_statistics_cputotal/mod_statistics_cputotal.lua @ 1882:99863a6a7b8c

mod_http_logging: Produce HTTP logs in the style of Apache
author Kim Alvefur <zash@zash.se>
date Wed, 30 Sep 2015 13:36:13 +0200
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
		}
	}
});