Software /
code /
prosody-modules
Diff
mod_statistics_cputotal/mod_statistics_cputotal.lua @ 1378:aa371405db34
mod_statistics_cputotal: Module that collects accumulated CPU usage statistics
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 03 Apr 2014 20:56:59 +0200 |
child | 1386:4557ac5c205d |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mod_statistics_cputotal/mod_statistics_cputotal.lua Thu Apr 03 20:56:59 2014 +0200 @@ -0,0 +1,11 @@ +-- Provides total CPU time, useful for DERIVE + +module:provides("statistics", { + statistics = { + cpu_total = { -- milliseconds of CPU time used + get = function() + return os.clock() * 1000; + end + } + } +});