Skip to content

Commit

Permalink
Fix metrics counters.
Browse files Browse the repository at this point in the history
  • Loading branch information
tao-stones committed Nov 15, 2023
1 parent b8c709e commit 7ba9fbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/banking_stage/consumer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ impl Consumer {
self.qos_service.accumulate_actual_execute_cu(cu);
self.qos_service.accumulate_actual_execute_time(us);

let (committed_cu, adjust_cu, committed_us) =
let (committed_cu, committed_us, adjust_cu) =
Self::accumulate_commit_transactions_result(commit_transactions_result.as_ref().ok());
self.qos_service
.accumulate_committed_execute_cu(committed_cu);
Expand Down
8 changes: 7 additions & 1 deletion runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4151,6 +4151,7 @@ impl Bank {
let (blockhash, lamports_per_signature) = self.last_blockhash_and_lamports_per_signature();

let mut executed_units = 0u64;
let mut executed_us = timings.execute_accessories.process_instructions.total_us;
let mut programs_modified_by_tx = LoadedProgramsForTxBatch::new(self.slot);
let mut programs_updated_only_for_global_cache = LoadedProgramsForTxBatch::new(self.slot);
let mut process_message_time = Measure::start("process_message_time");
Expand All @@ -4173,6 +4174,11 @@ impl Bank {
&mut executed_units,
);
process_message_time.stop();
executed_us = timings
.execute_accessories
.process_instructions
.total_us
.saturating_sub(executed_us);

saturating_add_assign!(
timings.execute_accessories.process_message_us,
Expand Down Expand Up @@ -4282,7 +4288,7 @@ impl Bank {
durable_nonce_fee,
return_data,
executed_units,
executed_us: timings.execute_accessories.process_instructions.total_us,
executed_us,
accounts_data_len_delta,
},
programs_modified_by_tx: Box::new(programs_modified_by_tx),
Expand Down

0 comments on commit 7ba9fbc

Please sign in to comment.