view mod_statistics_cputotal/mod_statistics_cputotal.lua @ 4941:7406039021d8

mod_auth_dovecot: Fix compat with Lua 5.2+ move of unpack() (thanks Tom)
author Kim Alvefur <zash@zash.se>
date Sat, 14 May 2022 15:52:23 +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
		}
	}
});