Files
pezkuwi-subxt/polkadot/runtime/metrics/Cargo.toml
T
Tsvetomir Dimitrov 22f404f092 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>
2023-03-28 13:37:19 +00:00

26 lines
963 B
TOML

[package]
name = "polkadot-runtime-metrics"
version.workspace = true
authors.workspace = true
edition.workspace = true
[dependencies]
sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false}
sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
parity-scale-codec = { version = "3.4.0", default-features = false }
primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
bs58 = { version = "0.4.0", default-features = false, features = ["alloc"] }
[features]
default = ["std"]
std = [
"sp-std/std",
"sp-tracing/std",
"parity-scale-codec/std",
"primitives/std",
"bs58/std"
]
runtime-metrics = ["sp-tracing/with-tracing", "frame-benchmarking"]