diff options
author | Péter Gömöri <[email protected]> | 2018-02-07 09:20:11 +0100 |
---|---|---|
committer | John Högberg <[email protected]> | 2018-02-13 09:45:58 +0100 |
commit | dfa4d62c263cd3f11338aba891179b08704d9287 (patch) | |
tree | ad4e30de5cc0b2372f39235cd47ccbf5be36cbcd /lib/tools/src/lcnt.erl | |
parent | 6328a1345783d13684407fc6dcbe9ea473c12cdd (diff) | |
download | otp-dfa4d62c263cd3f11338aba891179b08704d9287.tar.gz otp-dfa4d62c263cd3f11338aba891179b08704d9287.tar.bz2 otp-dfa4d62c263cd3f11338aba891179b08704d9287.zip |
Don't crash lcnt server if information/0 is called before collect/0
Diffstat (limited to 'lib/tools/src/lcnt.erl')
-rw-r--r-- | lib/tools/src/lcnt.erl | 2 |
1 files changed, 1 insertions, 1 deletions
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. |