mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-02-12 12:56:58 +00:00
guard metrics dump with chronosFuturesInstrumentation flag
This commit is contained in:
parent
c4adc65823
commit
eab506949d
22
codex.nim
22
codex.nim
@ -109,17 +109,17 @@ when isMainModule:
|
|||||||
|
|
||||||
notice "Stopping Codex"
|
notice "Stopping Codex"
|
||||||
|
|
||||||
let metrics = getFutureSummaryMetrics()
|
when defined(chronosFuturesInstrumentation):
|
||||||
for (k,v) in metrics.pairs():
|
let metrics = getFutureSummaryMetrics()
|
||||||
let count = v.count
|
for (k,v) in metrics.pairs():
|
||||||
if count > 0:
|
let count = v.count
|
||||||
echo ""
|
if count > 0:
|
||||||
echo "metric: ", $k
|
echo ""
|
||||||
echo "count: ", count
|
echo "metric: ", $k
|
||||||
echo "avg execTime:\t", v.totalExecTime div count, "\ttotal: ", v.totalExecTime
|
echo "count: ", count
|
||||||
echo "avg wallTime:\t", v.totalWallTime div count, "\ttotal: ", v.totalWallTime
|
echo "avg execTime:\t", v.totalExecTime div count, "\ttotal: ", v.totalExecTime
|
||||||
echo "avg runTime:\t", v.totalRunTime div count, "\ttotal: ", v.totalRunTime
|
echo "avg wallTime:\t", v.totalWallTime div count, "\ttotal: ", v.totalWallTime
|
||||||
|
echo "avg runTime:\t", v.totalRunTime div count, "\ttotal: ", v.totalRunTime
|
||||||
|
|
||||||
try:
|
try:
|
||||||
setControlCHook(controlCHandler)
|
setControlCHook(controlCHandler)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user