Sha256: c329886c5193910aff65e4f6b7dde8054e1c0680913d228ab608ab50e2d897c6

Contents?: true

Size: 687 Bytes

Versions: 8

Compression:

Stored size: 687 Bytes

Contents

#![cfg_attr(not(feature = "net"), allow(dead_code))]

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

#[derive(Default)]
pub(crate) struct IoDriverMetrics {
    pub(super) fd_registered_count: MetricAtomicU64,
    pub(super) fd_deregistered_count: MetricAtomicU64,
    pub(super) ready_count: MetricAtomicU64,
}

impl IoDriverMetrics {
    pub(crate) fn incr_fd_count(&self) {
        self.fd_registered_count.add(1, Relaxed);
    }

    pub(crate) fn dec_fd_count(&self) {
        self.fd_deregistered_count.add(1, Relaxed);
    }

    pub(crate) fn incr_ready_count_by(&self, amt: u64) {
        self.ready_count.add(amt, Relaxed);
    }
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/tokio-1.43.0/src/runtime/metrics/io.rs
wasmtime-28.0.0 ./ext/cargo-vendor/tokio-1.43.0/src/runtime/metrics/io.rs
wasmtime-27.0.0 ./ext/cargo-vendor/tokio-1.41.1/src/runtime/metrics/io.rs
wasmtime-26.0.0 ./ext/cargo-vendor/tokio-1.41.0/src/runtime/metrics/io.rs
wasmtime-25.0.2 ./ext/cargo-vendor/tokio-1.40.0/src/runtime/metrics/io.rs
wasmtime-25.0.1 ./ext/cargo-vendor/tokio-1.39.3/src/runtime/metrics/io.rs
wasmtime-25.0.0 ./ext/cargo-vendor/tokio-1.39.3/src/runtime/metrics/io.rs
wasmtime-24.0.0 ./ext/cargo-vendor/tokio-1.39.3/src/runtime/metrics/io.rs