Refs #50
File: crates/charon-metrics/src/lib.rs
Problem
charon_executor_profit_usd_cents is a histogram. Default Prometheus buckets target HTTP latency (0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10 seconds). Venus liquidation profit ranges from /tmp/pr50-cmds.sh.05 to 000+ per opportunity. With cents as unit (5 to 500000), every observation falls into the +Inf bucket. histogram_quantile returns NaN. The Grafana dashboard (PR #54) renders empty charts.
Fix
Define buckets covering realistic profit range:
const PROFIT_CENTS_BUCKETS: &[f64] = &[
5.0, // /tmp/pr50-cmds.sh.05 — dust
50.0, // /tmp/pr50-cmds.sh.50
500.0, //
2_500.0, // 5
10_000.0, // 00
50_000.0, // 00
250_000.0,// 500
1_000_000.0, // 0k
];
Pass to histogram registration. Same for block_duration_seconds (sibling issue).
Refs #50
File: crates/charon-metrics/src/lib.rs
Problem
charon_executor_profit_usd_cents is a histogram. Default Prometheus buckets target HTTP latency (0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10 seconds). Venus liquidation profit ranges from /tmp/pr50-cmds.sh.05 to 000+ per opportunity. With cents as unit (5 to 500000), every observation falls into the +Inf bucket. histogram_quantile returns NaN. The Grafana dashboard (PR #54) renders empty charts.
Fix
Define buckets covering realistic profit range:
Pass to histogram registration. Same for block_duration_seconds (sibling issue).