mirror of
https://github.com/logos-storage/nim-chronos.git
synced 2026-01-03 22:13:06 +00:00
improve assertion error messages
This commit is contained in:
parent
5d27b12b17
commit
8ffe7f4a88
@ -93,7 +93,7 @@ proc futureRunning(self: var ProfilerMetrics, event: Event): void =
|
||||
|
||||
self.partials.withValue(event.futureId, metrics):
|
||||
assert metrics.state == Pending or metrics.state == Paused,
|
||||
$event.location
|
||||
$event.location & " " & $metrics.state
|
||||
|
||||
self.bindParent(metrics)
|
||||
self.callStack.push(event.futureId)
|
||||
@ -107,7 +107,7 @@ proc futurePaused(self: var ProfilerMetrics, event: Event): void =
|
||||
assert event.futureId == self.callStack.pop(), $event.location
|
||||
|
||||
self.partials.withValue(event.futureId, metrics):
|
||||
assert metrics.state == Running, $event.location
|
||||
assert metrics.state == Running, $event.location & " " & $metrics.state
|
||||
|
||||
let segmentExecTime = event.timestamp - metrics.lastStarted
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user