Skip to content

Commit 17da1ce

Browse files
riptlripatel-fd
authored andcommitted
gui: fix idle metric
Fixes bundle tile showing as 100% busy all the time
1 parent 6e6577e commit 17da1ce

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/disco/gui/fd_gui_printf.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,12 @@ fd_gui_printf_tile_timers( fd_gui_t * gui,
693693
JSON. */
694694
idle = -1;
695695
} else {
696-
idle = (double)(cur[ i ].caughtup_postfrag_ticks - prev[ i ].caughtup_postfrag_ticks) / (cur_total - prev_total);
696+
idle = (double)(
697+
( cur[ i ].caughtup_prefrag_ticks +
698+
cur[ i ].caughtup_postfrag_ticks ) -
699+
( prev[ i ].caughtup_postfrag_ticks +
700+
prev[ i ].caughtup_prefrag_ticks )
701+
) / (cur_total - prev_total);
697702
}
698703

699704
jsonp_double( gui, NULL, idle );

0 commit comments

Comments
 (0)