Skip to content

Commit

Permalink
Fix compilation with metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
mratsim committed Dec 27, 2019
1 parent ee8e78b commit c898c41
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion weave/contexts.nim
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ template decCounter*(name: untyped{ident}) =
# Assumes localCtx is in the calling context
localCtx.counters.name -= 1

metrics:
import ./primitives/barriers

proc workerMetrics*() =
metrics:
Leader:
Expand All @@ -165,7 +168,7 @@ proc workerMetrics*() =
c_printf("+========================================+\n")
c_printf(" / use -d:WV_profile for high-res timers / \n")

discard pthread_barrier_wait(globalCtx.barrier)
discard globalCtx.barrier.wait()

c_printf("Worker %2d: %u steal requests sent\n", myID(), localCtx.counters.stealSent)
c_printf("Worker %2d: %u steal requests handled\n", myID(), localCtx.counters.stealHandled)
Expand Down

0 comments on commit c898c41

Please sign in to comment.