Add execute metrics
This commit is contained in:
@ -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,
|
||||
|
@ -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)?;
|
||||
|
||||
|
Reference in New Issue
Block a user