fix: stop double counting execution timings (#25605)

This commit is contained in:
Justin Starry 2022-05-28 00:06:29 +10:00 committed by GitHub
parent 8fdfe56a6f
commit ce14c63bf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -6,7 +6,7 @@ use {
invoke_context::{BuiltinProgram, Executors, InvokeContext},
log_collector::LogCollector,
sysvar_cache::SysvarCache,
timings::ExecuteTimings,
timings::{ExecuteDetailsTimings, ExecuteTimings},
},
solana_sdk::{
account::WritableAccount,
@ -173,7 +173,10 @@ impl MessageProcessor {
compute_units_consumed,
result.is_err(),
);
timings.details.accumulate(&invoke_context.timings);
invoke_context.timings = {
timings.details.accumulate(&invoke_context.timings);
ExecuteDetailsTimings::default()
};
saturating_add_assign!(
timings.execute_accessories.process_instructions.total_us,
time.as_us()