performance-metrics: Create test image for block I/O tests from main

In this way, we can avoid create/delete large temporary files during
every iteration of block I/O performance tests. Also, we can reuse the
'init/clean_tests()' interface in the future for other setup/cleanup.

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen
2022-02-07 16:39:15 -08:00
committed by Rob Bradford
parent 1cf73c83e2
commit b806935941
4 changed files with 23 additions and 23 deletions
+4
View File
@@ -336,6 +336,8 @@ fn run_test_with_timetout(test: &'static PerformanceTest) -> Result<String, Erro
fn main() {
let test_filter = env::var("TEST_FILTER").map_or("".to_string(), |o| o);
init_tests();
// Run performance tests sequentially and report results (in both readable/json format)
let mut json_output = String::new();
for test in TEST_LIST.iter() {
@@ -352,6 +354,8 @@ fn main() {
}
}
cleanup_tests();
// Todo: Report/upload to the metrics database
println!("\n\nTests result in json format: \n {}", json_output);
}