Add execute metrics

This commit is contained in:
Carl Lin
2021-12-20 23:03:20 -05:00
committed by Trent Nelson
parent 7d32909e17
commit b25e4a200b
12 changed files with 225 additions and 38 deletions

View File

@ -291,6 +291,7 @@ fn process_instruction_common(
0
};
let mut get_or_create_executor_time = Measure::start("get_or_create_executor_time");
let executor = match invoke_context.get_executor(program_id) {
Some(executor) => executor,
None => {
@ -306,6 +307,9 @@ fn process_instruction_common(
executor
}
};
get_or_create_executor_time.stop();
invoke_context.timings.get_or_create_executor_us += get_or_create_executor_time.as_us();
executor.execute(
next_first_instruction_account,
instruction_data,

View File

@ -6,6 +6,7 @@ use {
ic_logger_msg, ic_msg,
invoke_context::{ComputeMeter, InvokeContext},
stable_log,
timings::ExecuteTimings,
},
solana_rbpf::{
aligned_memory::AlignedMemory,
@ -2634,6 +2635,7 @@ fn call<'a, 'b: 'a>(
&instruction_accounts,
&program_indices,
&mut compute_units_consumed,
&mut ExecuteTimings::default(),
)
.map_err(SyscallError::InstructionError)?;