Add benchmark for the number of minimum cpu cores (#5127)
Fixes: https://github.com/paritytech/polkadot-sdk/issues/5122.
This PR extends the existing single core `benchmark_cpu` to also build a
score of the entire processor by spawning `EXPECTED_NUM_CORES(8)`
threads and averaging their throughput.
This is better than simply checking the number of cores, because also
covers multi-tenant environments where the OS sees a high number of
available CPUs, but because it has to share it with the rest of his
neighbours its total throughput does not satisfy the minimum
requirements.
## TODO
- [x] Obtain reference values on the reference hardware.
---------
Signed-off-by:
Alexandru Gheorghe <alexandru.gheorghe@parity.io>
parent
f6fd5bc5
Showing
- cumulus/polkadot-parachain/polkadot-parachain-lib/src/command.rs 4 additions, 1 deletion.../polkadot-parachain/polkadot-parachain-lib/src/command.rs
- cumulus/polkadot-parachain/polkadot-parachain-lib/src/common/spec.rs 3 additions, 1 deletion...kadot-parachain/polkadot-parachain-lib/src/common/spec.rs
- polkadot/cli/src/command.rs 1 addition, 1 deletionpolkadot/cli/src/command.rs
- polkadot/node/service/src/lib.rs 25 additions, 6 deletionspolkadot/node/service/src/lib.rs
- prdoc/pr_5127.prdoc 25 additions, 0 deletionsprdoc/pr_5127.prdoc
- substrate/bin/node/cli/src/service.rs 2 additions, 2 deletionssubstrate/bin/node/cli/src/service.rs
- substrate/client/sysinfo/src/lib.rs 17 additions, 5 deletionssubstrate/client/sysinfo/src/lib.rs
- substrate/client/sysinfo/src/sysinfo.rs 103 additions, 25 deletionssubstrate/client/sysinfo/src/sysinfo.rs
- substrate/utils/frame/benchmarking-cli/src/machine/hardware.rs 22 additions, 3 deletions...rate/utils/frame/benchmarking-cli/src/machine/hardware.rs
- substrate/utils/frame/benchmarking-cli/src/machine/mod.rs 5 additions, 3 deletionssubstrate/utils/frame/benchmarking-cli/src/machine/mod.rs
- substrate/utils/frame/benchmarking-cli/src/machine/reference_hardware.json 5 additions, 0 deletions...rame/benchmarking-cli/src/machine/reference_hardware.json
- templates/parachain/node/src/command.rs 4 additions, 1 deletiontemplates/parachain/node/src/command.rs
- templates/parachain/node/src/service.rs 1 addition, 1 deletiontemplates/parachain/node/src/service.rs