diff --git a/node/perf-test/src/command.rs b/node/perf-test/src/command.rs index d75b532ae0..9fffb47d32 100644 --- a/node/perf-test/src/command.rs +++ b/node/perf-test/src/command.rs @@ -467,18 +467,23 @@ impl PerfCmd { all_test_results.append(&mut results); } - let system_info = query_system_info()?; - let partition_info = query_partition_info(path).unwrap_or_else(|_| { - // TODO: this is inconsistent with behavior of query_system_info... - eprintln!("query_partition_info() failed, ignoring..."); - Default::default() - }); + let (system_info, partition_info) = if cmd.disable_sysinfo { + (None, None) + } else { + let sys = query_system_info()?; + let part = query_partition_info(path).unwrap_or_else(|_| { + // TODO: this is inconsistent with behavior of query_system_info... + eprintln!("query_partition_info() failed, ignoring..."); + Default::default() + }); + (Some(sys), Some(part)) + }; #[derive(Serialize)] struct AllResults { test_results: Vec, - system_info: SystemInfo, - partition_info: PartitionInfo, + system_info: Option, + partition_info: Option, } let all_results = AllResults { diff --git a/node/perf-test/src/lib.rs b/node/perf-test/src/lib.rs index d7c69f3fb9..b64d5cf768 100644 --- a/node/perf-test/src/lib.rs +++ b/node/perf-test/src/lib.rs @@ -42,6 +42,12 @@ pub struct PerfCmd { )] pub output_file: Option, + #[structopt( + long = "disable-sysinfo", + help = "Do not attempt to query system info." + )] + pub disable_sysinfo: bool, + // TODO: allow multiple tests (like the -l switch for logging) #[structopt( long = "tests",