Mercurial > prosody-modules
changeset 3431:8357cabc31f6
mod_measure_cpu: Also report the raw clock value, whatever that is
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 05 Jan 2019 18:44:50 +0100 |
parents | 6e70d354b7d8 |
children | 61368aec97d6 |
files | mod_measure_cpu/mod_measure_cpu.lua |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_measure_cpu/mod_measure_cpu.lua Fri Jan 04 03:14:55 2019 +0100 +++ b/mod_measure_cpu/mod_measure_cpu.lua Sat Jan 05 18:44:50 2019 +0100 @@ -6,6 +6,7 @@ local get_clock = os.clock; local measure_cpu_now = measure("amount", "cpu.percent"); -- Current percentage +local measure_cpu_now = measure("counter", "cpu.clock"); local last_cpu_wall, last_cpu_clock; module:hook("stats-update", function () @@ -17,6 +18,7 @@ last_cpu_wall, last_cpu_clock = new_wall, new_clock; measure_cpu_now(pc); + measure_cpu_now(new_clock); end); -- Some metadata for mod_munin