Skip to content

Commit 8e48ae1

Browse files
committed
stem: fix busy accounting when no input links
1 parent 1cd5015 commit 8e48ae1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/disco/stem/fd_stem.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -549,12 +549,11 @@ STEM_(run1)( ulong in_cnt,
549549
/* Select which in to poll next (randomized round robin) */
550550

551551
if( FD_UNLIKELY( !in_cnt ) ) {
552-
int was_busy = 0;
553-
was_busy |= !!charge_busy_before;
554-
was_busy |= !!charge_busy_after;
555-
metric_regime_ticks[ 0+was_busy ] += housekeeping_ticks;
552+
int was_busy = charge_busy_before+charge_busy_after;
553+
metric_regime_ticks[0] += housekeeping_ticks;
556554
long next = fd_tickcount();
557-
metric_regime_ticks[ 3+was_busy ] += (ulong)(next - now);
555+
if( FD_UNLIKELY( was_busy ) ) metric_regime_ticks[3] += (ulong)(next - now);
556+
else metric_regime_ticks[6] += (ulong)(next - now);
558557
now = next;
559558
continue;
560559
}

0 commit comments

Comments
 (0)