changeset 4039:2af0301af734

mod_measure_cpu: Specify units of total CPU time as seconds
author Kim Alvefur <zash@zash.se>
date Sun, 07 Jun 2020 00:19:49 +0200
parents 02d238799537
children e17c937a71b3 a533abe6ffd0
files mod_measure_cpu/mod_measure_cpu.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_measure_cpu/mod_measure_cpu.lua	Tue Jun 02 20:00:03 2020 +0200
+++ b/mod_measure_cpu/mod_measure_cpu.lua	Sun Jun 07 00:19:49 2020 +0200
@@ -6,7 +6,7 @@
 local get_clock = os.clock;
 
 local measure_cpu_now = measure("amount", "cpu.percent"); -- Current percentage
-local measure_cpu_total = measure("counter", "cpu.clock");
+local measure_cpu_total = measure("counter", "cpu.clock", { units = "seconds" });
 
 local last_cpu_wall, last_cpu_clock;
 module:hook("stats-update", function ()