move ExecuteTimings
from runtime::bank
to program_runtime::timings
This commit is contained in:
committed by
Trent Nelson
parent
47b74e28ec
commit
7d32909e17
@ -78,7 +78,7 @@ use {
|
||||
BuiltinProgram, Executor, Executors, ProcessInstructionWithContext, TransactionExecutor,
|
||||
},
|
||||
log_collector::LogCollector,
|
||||
timings::ExecuteDetailsTimings,
|
||||
timings::{ExecuteDetailsTimings, ExecuteTimings},
|
||||
},
|
||||
solana_sdk::{
|
||||
account::{
|
||||
@ -209,36 +209,6 @@ impl RentDebits {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
pub struct ExecuteTimings {
|
||||
pub check_us: u64,
|
||||
pub load_us: u64,
|
||||
pub execute_us: u64,
|
||||
pub store_us: u64,
|
||||
pub update_stakes_cache_us: u64,
|
||||
pub total_batches_len: usize,
|
||||
pub num_execute_batches: u64,
|
||||
pub details: ExecuteDetailsTimings,
|
||||
}
|
||||
impl ExecuteTimings {
|
||||
pub fn accumulate(&mut self, other: &ExecuteTimings) {
|
||||
self.check_us = self.check_us.saturating_add(other.check_us);
|
||||
self.load_us = self.load_us.saturating_add(other.load_us);
|
||||
self.execute_us = self.execute_us.saturating_add(other.execute_us);
|
||||
self.store_us = self.store_us.saturating_add(other.store_us);
|
||||
self.update_stakes_cache_us = self
|
||||
.update_stakes_cache_us
|
||||
.saturating_add(other.update_stakes_cache_us);
|
||||
self.total_batches_len = self
|
||||
.total_batches_len
|
||||
.saturating_add(other.total_batches_len);
|
||||
self.num_execute_batches = self
|
||||
.num_execute_batches
|
||||
.saturating_add(other.num_execute_batches);
|
||||
self.details.accumulate(&other.details);
|
||||
}
|
||||
}
|
||||
|
||||
type BankStatusCache = StatusCache<Result<()>>;
|
||||
#[frozen_abi(digest = "6XG6H1FChrDdY39K62KFWj5XfDao4dd24WZgcJkdMu1E")]
|
||||
pub type BankSlotDelta = SlotDelta<Result<()>>;
|
||||
|
Reference in New Issue
Block a user