4 releases

Uses new Rust 2024

0.0.24 Oct 22, 2025
0.0.23 Jul 11, 2025
0.0.22 Jun 24, 2024
0.0.21 May 11, 2024

#2132 in Asynchronous

Download history 7657/week @ 2025-10-20 16636/week @ 2025-10-27 14268/week @ 2025-11-03 12239/week @ 2025-11-10 14237/week @ 2025-11-17 10474/week @ 2025-11-24 13834/week @ 2025-12-01 18702/week @ 2025-12-08 16961/week @ 2025-12-15 7872/week @ 2025-12-22 8448/week @ 2025-12-29 16429/week @ 2026-01-05 16991/week @ 2026-01-12 14934/week @ 2026-01-19 19922/week @ 2026-01-26 22213/week @ 2026-02-02

74,262 downloads per month

MIT/Apache

190KB
3K SLoC

Monitor a tokio runtime.

Usage

use measured::MetricGroup;

#[derive(MetricGroup)]
#[metric(new())]
struct MyAppMetrics {
    #[cfg(tokio_unstable)]
    #[metric(namespace = "tokio")]
    #[metric(init = measured_tokio::RuntimeCollector::current())]
    tokio: measured_tokio::RuntimeCollector,

    // other metrics
}

#[tokio::main]
async fn main() {
    let metrics = MyAppMetrics::new();

    // when you run metrics.collect_group_into(...), you will sample tokio to get runtime state.

    # drop(metrics);
}

measured-tokio

Tokio metrics support for measured.

Dependencies

~4–15MB
~136K SLoC