Changeset

3444:e0fb97f47212

mod_measure_cpu: Rename counter metric to avoid name clash (thanks pep.)
author Kim Alvefur <zash@zash.se>
date Wed, 16 Jan 2019 17:30:23 +0100
parents 3443:284d8c18060e
children 3445:19924a2c4a48
files mod_measure_cpu/mod_measure_cpu.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_measure_cpu/mod_measure_cpu.lua	Tue Jan 15 16:41:58 2019 +0100
+++ b/mod_measure_cpu/mod_measure_cpu.lua	Wed Jan 16 17:30:23 2019 +0100
@@ -6,7 +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 measure_cpu_total = measure("counter", "cpu.clock");
 
 local last_cpu_wall, last_cpu_clock;
 module:hook("stats-update", function ()
@@ -18,7 +18,7 @@
 	last_cpu_wall, last_cpu_clock = new_wall, new_clock;
 
 	measure_cpu_now(pc);
-	measure_cpu_now(new_clock);
+	measure_cpu_total(new_clock);
 end);
 
 -- Some metadata for mod_munin