mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-02-14 22:07:28 +00:00
guard metrics dump with chronosFuturesInstrumentation flag
This commit is contained in:
parent
c4adc65823
commit
eab506949d
@ -109,6 +109,7 @@ when isMainModule:
|
|||||||
|
|
||||||
notice "Stopping Codex"
|
notice "Stopping Codex"
|
||||||
|
|
||||||
|
when defined(chronosFuturesInstrumentation):
|
||||||
let metrics = getFutureSummaryMetrics()
|
let metrics = getFutureSummaryMetrics()
|
||||||
for (k,v) in metrics.pairs():
|
for (k,v) in metrics.pairs():
|
||||||
let count = v.count
|
let count = v.count
|
||||||
@ -120,7 +121,6 @@ when isMainModule:
|
|||||||
echo "avg wallTime:\t", v.totalWallTime div count, "\ttotal: ", v.totalWallTime
|
echo "avg wallTime:\t", v.totalWallTime div count, "\ttotal: ", v.totalWallTime
|
||||||
echo "avg runTime:\t", v.totalRunTime div count, "\ttotal: ", v.totalRunTime
|
echo "avg runTime:\t", v.totalRunTime div count, "\ttotal: ", v.totalRunTime
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
setControlCHook(controlCHandler)
|
setControlCHook(controlCHandler)
|
||||||
except Exception as exc: # TODO Exception
|
except Exception as exc: # TODO Exception
|
||||||
|
Loading…
x
Reference in New Issue
Block a user