mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user