pub struct RuntimeStatistics {
pub total_gas_used: u64,
pub total_instructions_executed: u64,
pub max_stack_depth: u32,
pub storage_reads: u64,
pub storage_writes: u64,
pub state_changes: u64,
}Expand description
Runtime performance statistics
Fields§
§total_gas_used: u64§total_instructions_executed: u64§max_stack_depth: u32§storage_reads: u64§storage_writes: u64§state_changes: u64Implementations§
Source§impl RuntimeStatistics
impl RuntimeStatistics
Sourcepub fn total_storage_ops(&self) -> u64
pub fn total_storage_ops(&self) -> u64
Get total storage operations
Sourcepub fn avg_gas_per_instruction(&self) -> f64
pub fn avg_gas_per_instruction(&self) -> f64
Get average gas per instruction
Sourcepub fn merge(&mut self, other: &RuntimeStatistics)
pub fn merge(&mut self, other: &RuntimeStatistics)
Merge with another statistics instance
Trait Implementations§
Source§impl Clone for RuntimeStatistics
impl Clone for RuntimeStatistics
Source§fn clone(&self) -> RuntimeStatistics
fn clone(&self) -> RuntimeStatistics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RuntimeStatistics
impl Debug for RuntimeStatistics
Source§impl Default for RuntimeStatistics
impl Default for RuntimeStatistics
Source§fn default() -> RuntimeStatistics
fn default() -> RuntimeStatistics
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RuntimeStatistics
impl<'de> Deserialize<'de> for RuntimeStatistics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RuntimeStatistics
impl RefUnwindSafe for RuntimeStatistics
impl Send for RuntimeStatistics
impl Sync for RuntimeStatistics
impl Unpin for RuntimeStatistics
impl UnwindSafe for RuntimeStatistics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more