view mod_statistics_cputotal/mod_statistics_cputotal.lua @ 3724:1c3c7d73c5a6

mod_register_web: Fix to use real client IP in case of proxy forwarding (thanks Sebastian) mod_http since Prosody 0.11 will process the `X-Forwarded-For` header and store the result in `request.ip`.
author Kim Alvefur <zash@zash.se>
date Fri, 01 Nov 2019 17:15:29 +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
		}
	}
});