Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/tokio/src/runtime/metrics/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  mock.rs

  Sprache: Rust
 

//! This file contains mocks of the types in src/runtime/metrics

use std::thread::ThreadId;

pub(cratestruct SchedulerMetrics {}

pub(cratestruct WorkerMetrics {}

pub(cratestruct MetricsBatch {}

#[derive(Clone, Default)]
pub(cratestruct HistogramBuilder {}

impl SchedulerMetrics {
    pub(cratefn new() -> Self {
        Self {}
    }

    /// Increment the number of tasks scheduled externally
    pub(cratefn inc_remote_schedule_count(&self) {}
}

impl WorkerMetrics {
    pub(cratefn new() -> Self {
        Self {}
    }

    pub(cratefn from_config(config: &crate::runtime::Config) -> Self {
        // Prevent the dead-code warning from being triggered
        let _ = &config.metrics_poll_count_histogram;
        Self::new()
    }

    pub(cratefn set_queue_depth(&self, _len: usize) {}
    pub(cratefn set_thread_id(&self, _thread_id: ThreadId) {}
}

impl MetricsBatch {
    pub(cratefn new(_: &WorkerMetrics) -> Self {
        Self {}
    }

    pub(cratefn submit(&mut self, _to: &WorkerMetrics, _mean_poll_time: u64) {}
    pub(cratefn about_to_park(&mut self) {}
    pub(cratefn unparked(&mut self) {}
    pub(cratefn inc_local_schedule_count(&mut self) {}
    pub(cratefn start_processing_scheduled_tasks(&mut self) {}
    pub(cratefn end_processing_scheduled_tasks(&mut self) {}
    pub(cratefn start_poll(&mut self) {}
    pub(cratefn end_poll(&mut self) {}
}

cfg_rt_multi_thread! {
    impl MetricsBatch {
        pub(cratefn incr_steal_count(&mut self, _by: u16) {}
        pub(cratefn incr_steal_operations(&mut self) {}
        pub(cratefn incr_overflow_count(&mut self) {}
    }
}

Messung V0.5 in Prozent
C=81 H=100 G=90

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-06-23) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.