Struct linera_execution::ResourceTracker
source · pub struct ResourceTracker {
pub used_fuel: u64,
pub num_reads: u64,
pub bytes_read: u64,
pub bytes_written: u64,
pub maximum_bytes_left_to_read: u64,
pub maximum_bytes_left_to_write: u64,
}Expand description
The entries of the runtime related to storage
Fields§
§used_fuel: u64The used fuel in the computation
num_reads: u64The number of reads in the computation
bytes_read: u64The total number of bytes read
bytes_written: u64The total number of bytes written
maximum_bytes_left_to_read: u64The maximum size of read that remains available for use
maximum_bytes_left_to_write: u64The maximum size of write that remains available for use
Implementations§
source§impl ResourceTracker
impl ResourceTracker
sourcepub fn update_limits(
&mut self,
balance: &mut Amount,
policy: &ResourceControlPolicy,
runtime_counts: RuntimeCounts
) -> Result<(), ExecutionError>
pub fn update_limits( &mut self, balance: &mut Amount, policy: &ResourceControlPolicy, runtime_counts: RuntimeCounts ) -> Result<(), ExecutionError>
Updates the limits for the maximum and updates the balance.
sourcepub fn limits(
&self,
policy: &ResourceControlPolicy,
balance: &Amount
) -> RuntimeLimits
pub fn limits( &self, policy: &ResourceControlPolicy, balance: &Amount ) -> RuntimeLimits
Obtain the limits for the running of the system
Trait Implementations§
source§impl Clone for ResourceTracker
impl Clone for ResourceTracker
source§fn clone(&self) -> ResourceTracker
fn clone(&self) -> ResourceTracker
Returns a copy 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 ResourceTracker
impl Debug for ResourceTracker
impl Copy for ResourceTracker
Auto Trait Implementations§
impl RefUnwindSafe for ResourceTracker
impl Send for ResourceTracker
impl Sync for ResourceTracker
impl Unpin for ResourceTracker
impl UnwindSafe for ResourceTracker
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Upcastable for Twhere
T: Any + Send + Sync + 'static,
impl<T> Upcastable for Twhere T: Any + Send + Sync + 'static,
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref
§fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
upcast boxed dyn