diff options
author | orwell96 <orwell@bleipb.de> | 2019-12-07 09:15:06 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2019-12-07 09:15:06 +0100 |
commit | f21b5aedd58b0b5a094b5055af1138c302f0801d (patch) | |
tree | 1d1b01887d38cb1ba7b276b612668d547ea4900e | |
parent | 5fee51a150d5491546495a906b94deddd3e1b917 (diff) | |
download | advprofiler-f21b5aedd58b0b5a094b5055af1138c302f0801d.tar.gz advprofiler-f21b5aedd58b0b5a094b5055af1138c302f0801d.tar.bz2 advprofiler-f21b5aedd58b0b5a094b5055af1138c302f0801d.zip |
-rw-r--r-- | init.lua | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 |