Software /
code /
prosody-modules
Changeset
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 |
parents | 1377:92f3b4d81b52 |
children | 1379:403d5cd924eb |
files | mod_statistics_cputotal/mod_statistics_cputotal.lua |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
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 + } + } +});