From f21b5aedd58b0b5a094b5055af1138c302f0801d Mon Sep 17 00:00:00 2001 From: orwell96 Date: Sat, 7 Dec 2019 09:15:06 +0100 Subject: Revert change to report function --- init.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index d137ecf..a97ebc9 100644 --- a/init.lua +++ b/init.lua @@ -250,9 +250,16 @@ function advprofiler.get_report_columns(rep) } end +local function t1000(t) + return t and t*1000 or 0 +end + function advprofiler.report(rep) - local colt = advprofiler.get_report_columns(rep) - return table.concat(colt, "\t") + return string.format("Count avg=%d\tmax=%d\ttotal=%d\tTime avg=%dms\tmax=%dms\ttotal=%dms\tPer-Call avg=%dms\tmax=%dms", + rep.count_avg, rep.count_max, rep.count_tot, + t1000(rep.time_avg), t1000(rep.time_max), t1000(rep.time_tot), + t1000(rep.per_call_avg), t1000(rep.per_call_max)) + end -- cgit v1.2.3