Skip to content
Snippets Groups Projects

[io/Stats] only record steal attempts if stats are enabled

Closed Florian Fischer requested to merge aj46ezos/emper:fix-steal-attempt-stats into master
1 file
+ 4
1
Compare changes
  • Side-by-side
  • Inline
+ 4
1
@@ -211,7 +211,10 @@ class Stats {
abort();
}
inline void recordStealAttempt() { ATOMIC_INC_RELAXED(steal_attempts); }
inline void recordStealAttempt() {
RETURN_IF_NO_STATS();
ATOMIC_INC_RELAXED(steal_attempts);
}
// running mean calculation taken from
// https://math.stackexchange.com/questions/106700/incremental-averageing
Loading