From dfa4d62c263cd3f11338aba891179b08704d9287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20G=C3=B6m=C3=B6ri?= Date: Wed, 7 Feb 2018 09:20:11 +0100 Subject: Don't crash lcnt server if information/0 is called before collect/0 --- lib/tools/src/lcnt.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/tools/src') diff --git a/lib/tools/src/lcnt.erl b/lib/tools/src/lcnt.erl index 139b3d8a4a..e306979dea 100644 --- a/lib/tools/src/lcnt.erl +++ b/lib/tools/src/lcnt.erl @@ -943,7 +943,7 @@ print_state_information(#state{locks = Locks} = State) -> print(kv("#tries", s(Stats#stats.tries))), print(kv("#colls", s(Stats#stats.colls))), print(kv("wait time", s(Stats#stats.time) ++ " us" ++ " ( " ++ s(Stats#stats.time/1000000) ++ " s)")), - print(kv("percent of duration", s(Stats#stats.time/State#state.duration*100) ++ " %")), + print(kv("percent of duration", s(percent(Stats#stats.time, State#state.duration)) ++ " %")), ok. -- cgit v1.2.3