// TODO: _run may be totally unnecessary.
_run may be totally unnecessary.
_run may be totally unnecessary .
pub(crate) fn ready(&mut self, _run: &AppRun, force: bool) -> HarvestReady {
        let now = Instant::now();
        let mut ready = HarvestReady::default();
        if self.metrics_traces_timer.ready(now, force) {
            log::debug!("Processing metrics traces...");
            self.metric_table
                .add_count(crate::metric_names::INSTANCE_REPORTING, None, 1.0, true);
            ready.metric_table = Some(std::mem::replace(
                &mut self.metric_table,
                MetricTable::new(),
            ));
            ready.txn_traces = Some(std::mem::replace(
                &mut self.txn_traces,
                HarvestTraces::new(),
            ));
        }
        if self.span_events_timer.ready(now, force) {
            log::debug!("Processing span events...");
        }
        if self.custom_events_timer.ready(now, force) {
            log::debug!("Processing custom events...");
        }
        if self.txn_events_timer.ready(now, force) {
            log::debug!("Processing txn events...");
            ready.txn_events = Some(std::mem::replace(&mut self.txn_events, vec![]));
        }
        if self.error_events_timer.ready(now, force) {
            log::debug!("Processing error events...");
        }
        ready
    }
pub ( crate ) fn ready ( & mut self , _run : & AppRun , force : bool ) -> HarvestReady { let now = Instant :: now ( ) ; let mut ready = HarvestReady :: default ( ) ; if self . metrics_traces_timer . ready ( now , force ) { log :: debug ! ( " " ) ; self . metric_table . add_count ( crate :: metric_names :: INSTANCE_REPORTING , None , 1.0 , true ) ; ready . metric_table = Some ( std :: mem :: replace ( & mut self . metric_table , MetricTable :: new ( ) , ) ) ; ready . txn_traces = Some ( std :: mem :: replace ( & mut self . txn_traces , HarvestTraces :: new ( ) , ) ) ; } if self . span_events_timer . ready ( now , force ) { log :: debug ! ( " " ) ; } if self . custom_events_timer . ready ( now , force ) { log :: debug ! ( " " ) ; } if self . txn_events_timer . ready ( now , force ) { log :: debug ! ( " " ) ; ready . txn_events = Some ( std :: mem :: replace ( & mut self . txn_events , vec ! [ ] ) ) ; } if self . error_events_timer . ready ( now , force ) { log :: debug ! ( " " ) ; } ready }
TODO: _run may be totally unnecessary.
TODO : _run may be totally unnecessary .
&mut self
_run
&AppRun
force
bool