Histogram support in runtime metrics (#6935)
* Histogram support in runtime metrics Add support for histograms to the runtime metrics. Additionally add `polkadot_parachain_verify_dispute_signature` histogram which tracks the time needed from the runtime to verify a single validator signature of a dispute statement. * Add noops * u64 instead of f64 * Update buckets * Wrap `get_current_time()` in runtime metrics * Change the dimension of the Histogram from usec to sec * Fix a compilation error * Update buckets * Fix `on_signature_check_complete` calculation * Update buckets * Update buckets * formatting * Another weights update * Adjust buckets again * Final buckets adjustment * Revert "Fix a compilation error" This reverts commit 06290b40a39eeb78de2602d8916a39edf7a8b714. * Update primitives/src/v4/metrics.rs Co-authored-by:Andrei Sandu <54316454+sandreim@users.noreply.github.com> * Use `saturating_sub` for time difference calculation * Pass nanoseconds to client instead of seconds (using f64 in runtime is dangerous) --------- Co-authored-by:
Andrei Sandu <54316454+sandreim@users.noreply.github.com>
Showing
- polkadot/Cargo.lock 1 addition, 0 deletionspolkadot/Cargo.lock
- polkadot/node/metrics/src/runtime/mod.rs 44 additions, 20 deletionspolkadot/node/metrics/src/runtime/mod.rs
- polkadot/node/metrics/src/runtime/parachain.rs 2 additions, 1 deletionpolkadot/node/metrics/src/runtime/parachain.rs
- polkadot/primitives/src/v4/metrics.rs 20 additions, 0 deletionspolkadot/primitives/src/v4/metrics.rs
- polkadot/runtime/metrics/Cargo.toml 2 additions, 1 deletionpolkadot/runtime/metrics/Cargo.toml
- polkadot/runtime/metrics/src/with_runtime_metrics.rs 35 additions, 6 deletionspolkadot/runtime/metrics/src/with_runtime_metrics.rs
- polkadot/runtime/metrics/src/without_runtime_metrics.rs 23 additions, 1 deletionpolkadot/runtime/metrics/src/without_runtime_metrics.rs
- polkadot/runtime/parachains/src/disputes.rs 14 additions, 6 deletionspolkadot/runtime/parachains/src/disputes.rs
- polkadot/runtime/parachains/src/metrics.rs 12 additions, 4 deletionspolkadot/runtime/parachains/src/metrics.rs
Please register or sign in to comment