pub struct CounterMetrics {
    pub call_atomic_op: u64,
    pub call_clear: u64,
    pub call_clear_range: u64,
    pub call_get: u64,
    pub keys_values_fetched: u64,
    pub bytes_read: u64,
    pub call_set: u64,
    pub bytes_written: u64,
}Expand description
CounterMetrics is used in two contexts within the metrics system:
- As 
currentmetrics: tracking operations for the current transaction attempt - As 
totalmetrics: aggregating operations across all transaction attempts including retries 
Each counter is incremented when the corresponding operation is performed, allowing for detailed analysis of transaction behavior and performance characteristics.
Fields§
§call_atomic_op: u64Number of atomic operations performed (add, and, or, etc.)
call_clear: u64Number of key clear operations performed
call_clear_range: u64Number of range clear operations performed
call_get: u64Number of get operations performed
keys_values_fetched: u64Total number of key-value pairs fetched across all read operations
bytes_read: u64Total number of bytes read from the database
call_set: u64Number of set operations performed
bytes_written: u64Total number of bytes written to the database
Implementations§
Source§impl CounterMetrics
 
impl CounterMetrics
Sourcepub fn increment(&mut self, fdb_command: &FdbCommand)
 
pub fn increment(&mut self, fdb_command: &FdbCommand)
Increments the metrics for a given FDB command.
This method updates the metrics counters based on the type of FDB command.
§Arguments
fdb_command- The FDB command to increment metrics for
Trait Implementations§
Source§impl Clone for CounterMetrics
 
impl Clone for CounterMetrics
Source§fn clone(&self) -> CounterMetrics
 
fn clone(&self) -> CounterMetrics
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 CounterMetrics
 
impl Debug for CounterMetrics
Source§impl Default for CounterMetrics
 
impl Default for CounterMetrics
Source§fn default() -> CounterMetrics
 
fn default() -> CounterMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CounterMetrics
impl RefUnwindSafe for CounterMetrics
impl Send for CounterMetrics
impl Sync for CounterMetrics
impl Unpin for CounterMetrics
impl UnwindSafe for CounterMetrics
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