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  scheduler.rs

  Sprache: Rust
 

use crate::loom::sync::atomic::Ordering::Relaxed;
use crate::util::metric_atomics::MetricAtomicU64;

/// Retrieves metrics from the Tokio runtime.
///
/// **Note**: This is an [unstable API][unstable]. The public API of this type
/// may break in 1.x releases. See [the documentation on unstable
/// features][unstable] for details.
///
/// [unstable]: crate#unstable-features
#[derive(Debug)]
pub(cratestruct SchedulerMetrics {
    /// Number of tasks that are scheduled from outside the runtime.
    pub(super) remote_schedule_count: MetricAtomicU64,
    pub(super) budget_forced_yield_count: MetricAtomicU64,
}

impl SchedulerMetrics {
    pub(cratefn new() -> SchedulerMetrics {
        SchedulerMetrics {
            remote_schedule_count: MetricAtomicU64::new(0),
            budget_forced_yield_count: MetricAtomicU64::new(0),
        }
    }

    /// Increment the number of tasks scheduled externally
    pub(cratefn inc_remote_schedule_count(&self) {
        self.remote_schedule_count.add(1, Relaxed);
    }

    /// Increment the number of tasks forced to yield due to budget exhaustion
    pub(cratefn inc_budget_forced_yield_count(&self) {
        self.budget_forced_yield_count.add(1, Relaxed);
    }
}

Messung V0.5 in Prozent
C=83 H=92 G=87

¤ Dauer der Verarbeitung: 0.1 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.