Software /
code /
prosody
Changeset
10902:5d113332855c
mod_admin_shell: Skip multiplier adjustment for rates
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 04 Jun 2020 16:54:52 +0200 |
parents | 10901:5e33926f4b43 |
children | 10903:c5f26f9adb31 |
files | plugins/mod_admin_shell.lua |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_shell.lua Thu Jun 04 15:19:20 2020 +0100 +++ b/plugins/mod_admin_shell.lua Thu Jun 04 16:54:52 2020 +0200 @@ -1318,13 +1318,14 @@ elseif type == "rate" then unit = " events/sec" if ref_value < 0.9 then - unit = " events/min" + unit = "events/min" value = value*60; if ref_value < 0.6/60 then - unit = " events/h" + unit = "events/h" value = value*60; end end + return ("%.3g %s"):format(value, unit); end end return format_number(value, short_units[unit] or unit or "", unit == "bytes" and 'b' or nil);