mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 09:57:56 +00:00
f0e589d72e
### What's been done - `subsystem-bench` has been split into two parts: a cli benchmark runner and a library. - The cli runner is quite simple. It just allows us to run `.yaml` based test sequences. Now it should only be used to run benchmarks during development. - The library is used in the cli runner and in regression tests. Some code is changed to make the library independent of the runner. - Added first regression tests for availability read and write that replicate existing test sequences. ### How we run regression tests - Regression tests are simply rust integration tests without the harnesses. - They should only be compiled under the `subsystem-benchmarks` feature to prevent them from running with other tests. - This doesn't work when running tests with `nextest` in CI, so additional filters have been added to the `nextest` runs. - Each benchmark run takes a different time in the beginning, so we "warm up" the tests until their CPU usage differs by only 1%. - After the warm-up, we run the benchmarks a few more times and compare the average with the exception using a precision. ### What is still wrong? - I haven't managed to set up approval voting tests. The spread of their results is too large and can't be narrowed down in a reasonable amount of time in the warm-up phase. - The tests start an unconfigurable prometheus endpoint inside, which causes errors because they use the same 9999 port. I disable it with a flag, but I think it's better to extract the endpoint launching outside the test, as we already do with `valgrind` and `pyroscope`. But we still use `prometheus` inside the tests. ### Future work * https://github.com/paritytech/polkadot-sdk/issues/3528 * https://github.com/paritytech/polkadot-sdk/issues/3529 * https://github.com/paritytech/polkadot-sdk/issues/3530 * https://github.com/paritytech/polkadot-sdk/issues/3531 --------- Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com>
50 lines
1.8 KiB
TOML
50 lines
1.8 KiB
TOML
[package]
|
|
name = "polkadot-availability-distribution"
|
|
description = "The Availability Distribution subsystem. Requests the required availability data. Also distributes availability data and chunks to requesters."
|
|
version = "7.0.0"
|
|
authors.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
futures = "0.3.21"
|
|
gum = { package = "tracing-gum", path = "../../gum" }
|
|
parity-scale-codec = { version = "3.6.1", features = ["std"] }
|
|
polkadot-primitives = { path = "../../../primitives" }
|
|
polkadot-erasure-coding = { path = "../../../erasure-coding" }
|
|
polkadot-node-network-protocol = { path = "../protocol" }
|
|
polkadot-node-subsystem = { path = "../../subsystem" }
|
|
polkadot-node-subsystem-util = { path = "../../subsystem-util" }
|
|
polkadot-node-primitives = { path = "../../primitives" }
|
|
sp-core = { path = "../../../../substrate/primitives/core", features = ["std"] }
|
|
sp-keystore = { path = "../../../../substrate/primitives/keystore" }
|
|
thiserror = { workspace = true }
|
|
rand = "0.8.5"
|
|
derive_more = "0.99.17"
|
|
schnellru = "0.2.1"
|
|
fatality = "0.0.6"
|
|
|
|
[dev-dependencies]
|
|
polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" }
|
|
sp-core = { path = "../../../../substrate/primitives/core", features = ["std"] }
|
|
sp-keyring = { path = "../../../../substrate/primitives/keyring" }
|
|
sp-tracing = { path = "../../../../substrate/primitives/tracing" }
|
|
sc-network = { path = "../../../../substrate/client/network" }
|
|
futures-timer = "3.0.2"
|
|
assert_matches = "1.4.0"
|
|
polkadot-primitives-test-helpers = { path = "../../../primitives/test-helpers" }
|
|
polkadot-subsystem-bench = { path = "../../subsystem-bench" }
|
|
|
|
|
|
[[test]]
|
|
name = "availability-distribution-regression-bench"
|
|
path = "tests/availability-distribution-regression-bench.rs"
|
|
harness = false
|
|
required-features = ["subsystem-benchmarks"]
|
|
|
|
[features]
|
|
subsystem-benchmarks = []
|