mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-01 17:35:19 +00:00
performance-metrics: Include 'max' and 'min' in the result
Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
parent
a7024074c0
commit
e41fe0acae
@ -27,6 +27,8 @@ pub struct PerformanceTestResult {
|
||||
name: String,
|
||||
mean: f64,
|
||||
std_dev: f64,
|
||||
max: f64,
|
||||
min: f64,
|
||||
}
|
||||
|
||||
pub struct PerformanceTestControl {
|
||||
@ -106,11 +108,15 @@ impl PerformanceTest {
|
||||
|
||||
let mean = mean(&metrics).unwrap();
|
||||
let std_dev = std_deviation(&metrics).unwrap();
|
||||
let max = metrics.clone().into_iter().reduce(f64::max).unwrap();
|
||||
let min = metrics.clone().into_iter().reduce(f64::min).unwrap();
|
||||
|
||||
PerformanceTestResult {
|
||||
name: self.name.to_string(),
|
||||
mean,
|
||||
std_dev,
|
||||
max,
|
||||
min,
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user