mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
Regression algorithm for runtime benchmarks (#5288)
* Add linregress * Regression, initial stuff. * More analytics * whitespace * Fix * Median slopes regression algo * Warnings * Update to lastest benchmark changes. * Use both algorithms temp. * Move analysis to frame. * Fix tests. * Only build analysis in std Co-authored-by: Gav Wood <gavin@parity.io>
This commit is contained in:
@@ -22,7 +22,7 @@ use sc_client_db::BenchmarkingState;
|
||||
use sc_service::{Configuration, ChainSpec};
|
||||
use sc_executor::{NativeExecutor, NativeExecutionDispatch};
|
||||
use codec::{Encode, Decode};
|
||||
use frame_benchmarking::BenchmarkResults;
|
||||
use frame_benchmarking::{BenchmarkResults, Analysis};
|
||||
use sp_core::{
|
||||
tasks,
|
||||
traits::KeystoreExt,
|
||||
@@ -163,6 +163,17 @@ impl BenchmarkCmd {
|
||||
print!("{:?},{:?}\n", result.1, result.2);
|
||||
});
|
||||
|
||||
print!("\n");
|
||||
|
||||
// Conduct analysis.
|
||||
if let Some(analysis) = Analysis::median_slopes(&results) {
|
||||
println!("Median Slopes Analysis\n========\n{}", analysis);
|
||||
}
|
||||
|
||||
if let Some(analysis) = Analysis::min_squares_iqr(&results) {
|
||||
println!("Min Squares Analysis\n========\n{}", analysis);
|
||||
}
|
||||
|
||||
eprintln!("Done.");
|
||||
}
|
||||
Err(error) => eprintln!("Error: {:?}", error),
|
||||
|
||||
Reference in New Issue
Block a user