Skip to content

Commit

Permalink
[metrics] Better latency buckets for db operations (#20873)
Browse files Browse the repository at this point in the history
* Remove buckets in 10+ seconds range
* Add fine grain buckets in sub-millisecond range where most of normal
latencies are
  • Loading branch information
andll authored Jan 14, 2025
1 parent abde857 commit 2c0cea6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/typed-store/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ thread_local! {
}

const LATENCY_SEC_BUCKETS: &[f64] = &[
0.001, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1., 2.5, 5., 10., 20., 30., 60., 90.,
0.00001, 0.00005, // 10 mcs, 50 mcs
0.0001, 0.0002, 0.0003, 0.0004, 0.0005, // 100..500 mcs
0.001, 0.002, 0.003, 0.004, 0.005, // 1..5ms
0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1., 2.5, 5., 10.,
];

#[derive(Debug, Clone)]
Expand Down

0 comments on commit 2c0cea6

Please sign in to comment.