mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +00:00
profile mode (#5617)
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#[macro_use] mod core;
|
||||
mod import;
|
||||
|
||||
use crate::core::run_benchmark;
|
||||
use crate::core::{run_benchmark, Mode as BenchmarkMode};
|
||||
use import::{ImportBenchmarkDescription, SizeType};
|
||||
use node_testing::bench::{Profile, KeyTypes};
|
||||
use structopt::StructOpt;
|
||||
@@ -41,6 +41,15 @@ struct Opt {
|
||||
///
|
||||
/// Run with `--list` for the hint of what to filter.
|
||||
filter: Option<String>,
|
||||
|
||||
/// Mode
|
||||
///
|
||||
/// "regular" for regular becnhmark
|
||||
///
|
||||
/// "profile" mode adds pauses between measurable runs,
|
||||
/// so that actual interval can be selected in the profiler of choice.
|
||||
#[structopt(short, long, default_value = "regular")]
|
||||
mode: BenchmarkMode,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
@@ -81,7 +90,7 @@ fn main() {
|
||||
for benchmark in benchmarks {
|
||||
if opt.filter.as_ref().map(|f| benchmark.path().has(f)).unwrap_or(true) {
|
||||
log::info!("Starting {}", benchmark.name());
|
||||
let result = run_benchmark(benchmark);
|
||||
let result = run_benchmark(benchmark, opt.mode);
|
||||
log::info!("{}", result);
|
||||
|
||||
results.push(result);
|
||||
|
||||
Reference in New Issue
Block a user