Skip to content

Commit

Permalink
Rename to is_unified_scheduler_enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Jun 18, 2024
1 parent e0b6fc3 commit 92bf84e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions core/src/replay_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3009,20 +3009,22 @@ impl ReplayStage {
.expect("Bank fork progress entry missing for completed bank");

let replay_stats = bank_progress.replay_stats.clone();
let mut are_stats_from_completed_scheduler = false;
let mut is_unified_scheduler_enabled = false;

if let Some((result, completed_execute_timings)) =
bank.wait_for_completed_scheduler()
{
are_stats_from_completed_scheduler = true;
// It's guaranteed that wait_for_completed_scheduler() returns Some(_), iff the
// unified scheduler is enabled for the bank.
is_unified_scheduler_enabled = true;
let metrics = ExecuteBatchesInternalMetrics::new_with_timings_from_all_threads(
completed_execute_timings,
);
replay_stats
.write()
.unwrap()
.batch_execute
.accumulate(metrics, are_stats_from_completed_scheduler);
.accumulate(metrics, is_unified_scheduler_enabled);

if let Err(err) = result {
let root = bank_forks.read().unwrap().root();
Expand Down Expand Up @@ -3221,7 +3223,7 @@ impl ReplayStage {
r_replay_progress.num_entries,
r_replay_progress.num_shreds,
bank_complete_time.as_us(),
are_stats_from_completed_scheduler,
is_unified_scheduler_enabled,
);
execute_timings.accumulate(&r_replay_stats.batch_execute.totals);
} else {
Expand Down

0 comments on commit 92bf84e

Please sign in to comment.