Benchmarks sanity checks (#6119)

* add read-only externalities

* sanity checks

* cleanup

* Update primitives/state-machine/src/read_only.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* fix typo

* add error exit code if nothing was run

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Nikolay Volf
2020-05-25 17:52:50 +03:00
committed by GitHub
parent 56819a09a4
commit 60e7c706db
6 changed files with 241 additions and 0 deletions
+5
View File
@@ -152,6 +152,11 @@ fn main() {
}
}
if results.is_empty() {
eprintln!("No benchmark was found for query");
std::process::exit(1);
}
if opt.json {
let json_result: String = serde_json::to_string(&results).expect("Failed to construct json");
println!("{}", json_result);