pub async fn log_metrics(&self, level: log::Level) {
        let mut r = self.num_reads.write().await;
        let mut w = self.num_writes.write().await;

        let msg = format!("Transaction writes: {}, Transaction reads: {}", *w, *r);

        *r = 0;
        *w = 0;

        match level {
            log::Level::Trace => trace!("{}", msg),
            log::Level::Debug => debug!("{}", msg),
            log::Level::Info => info!("{}", msg),
            log::Level::Warn => warn!("{}", msg),
            _ => error!("{}", msg),
        }
    }
/// Log metrics about the current transaction instance. Metrics will be cleared after log call
Log metrics about the current transaction instance. Metrics will be cleared after log call
Log metrics about the current transaction instance . Metrics will be cleared after log call
pub async fn log_metrics(&self, level: log::Level) {
        let mut r = self.num_reads.write().await;
        let mut w = self.num_writes.write().await;
        let msg = format!("Transaction writes: {}, Transaction reads: {}", *w, *r);
        *r = 0;
        *w = 0;
        match level {
            log::Level::Trace => trace!("{}", msg),
            log::Level::Debug => debug!("{}", msg),
            log::Level::Info => info!("{}", msg),
            log::Level::Warn => warn!("{}", msg),
            _ => error!("{}", msg),
        }
    }
pub async fn log_metrics ( & self , level : log :: Level ) { let mut r = self . num_reads . write ( ) . await ; let mut w = self . num_writes . write ( ) . await ; let msg = format ! ( " " w r ) ; * r = 0 ; * w = 0 ; match level { log :: Level :: Trace => trace ! ( " " msg ) , log :: Level :: Debug => debug ! ( " " msg ) , log :: Level :: Info => info ! ( " " msg ) , log :: Level :: Warn => warn ! ( " " msg ) , _ => error ! ( " " msg ) , } }
Log metrics about the current transaction instance.
Log metrics about the current transaction instance .
&self
level
log::Level
&self
level
log::Level