MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / mean

Function mean

performance-metrics/src/main.rs:331–339  ·  view source on GitHub ↗
(data: &[f64])

Source from the content-addressed store, hash-verified

329}
330
331fn mean(data: &[f64]) -> Option<f64> {
332 let count = data.len();
333
334 if count > 0 {
335 Some(data.iter().sum::<f64>() / count as f64)
336 } else {
337 None
338 }
339}
340
341fn std_deviation(data: &[f64]) -> Option<f64> {
342 let count = data.len();

Callers 3

runMethod · 0.85
std_deviationFunction · 0.85
performance_net_latencyFunction · 0.85

Calls 2

iterMethod · 0.80
lenMethod · 0.45

Tested by 1

performance_net_latencyFunction · 0.68