From 23eac92eb9e6cb133336f67e104c00b9f200cb5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 16 Jun 2021 20:41:24 +0800 Subject: test performance --- script/core/diagnostics/init.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'script/core/diagnostics') diff --git a/script/core/diagnostics/init.lua b/script/core/diagnostics/init.lua index 82107a2d..5446a7c3 100644 --- a/script/core/diagnostics/init.lua +++ b/script/core/diagnostics/init.lua @@ -59,6 +59,9 @@ local function check(uri, name, results) if passed >= 0.5 then log.warn(('Diagnostics [%s] @ [%s] takes [%.3f] sec!'):format(name, uri, passed)) end + if DIAGTIMES then + DIAGTIMES[name] = (DIAGTIMES[name] or 0) + passed + end end return function (uri, response) -- cgit v1.2.3