rivet-metrics 2.3.13

Prometheus metric helpers for Rivet crates
Documentation
pub const BUCKETS: &[f64] = &[
	0.001,
	0.0025, // Copied from https://docs.rs/prometheus/latest/src/prometheus/histogram.rs.html#25-27
	0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0, 25.0, 50.0, 100.0, 250.0, 500.0,
];

pub const MICRO_BUCKETS: &[f64] = &[
	0.0001, 0.00025, 0.0005, 0.001, 0.0025, 0.005, 0.01, 0.025, 0.05, 0.10, 0.25, 0.5, 1.0, 2.5,
	5.0, 10.0, 25.0, 50.0,
];

pub const LIFETIME_BUCKETS: &[f64] = &[1.0, 10.0, 60.0, 300.0, 600.0, 1200.0, 1800.0, 3600.0];

pub const PAGE_COUNT_BUCKETS: &[f64] = &[0.0, 1.0, 4.0, 16.0, 64.0, 256.0, 1024.0, 4096.0, 8192.0];

// Calculated based on the LogHistogram configuration in `packages/common/runtime/src/lib.rs`
pub const TASK_POLL_BUCKETS: &[f64] = &[
	0.00002,
	0.000032768,
	0.000065536,
	0.000131072,
	0.000262144,
	0.000524288,
	0.001048576,
	0.002097152,
	0.004194304,
	0.008388608,
	0.016777216,
	0.032,
];