Making the vencord server happy
Standard deviation is the correct way but shush
This commit is contained in:
parent
07b9da7a08
commit
77f167d992
1 changed files with 1 additions and 2 deletions
|
@ -152,8 +152,7 @@ async fn main() {
|
||||||
}
|
}
|
||||||
timings.drain(..=(warmup as usize));
|
timings.drain(..=(warmup as usize));
|
||||||
let avg = (timings.iter().sum::<Duration>() / n).as_nanos();
|
let avg = (timings.iter().sum::<Duration>() / n).as_nanos();
|
||||||
let deviation = (avg - timings.iter().min().unwrap().as_nanos())
|
let deviation = (((timings.iter().max().unwrap().as_nanos() - timings.iter().min().unwrap().as_nanos()).pow(2) / 16) as f64).sqrt() as u128;
|
||||||
.max(timings.iter().max().unwrap().as_nanos() - avg);
|
|
||||||
|
|
||||||
let (avg, avg_units) = if avg >= 1000000000 {
|
let (avg, avg_units) = if avg >= 1000000000 {
|
||||||
(avg as f64 / 1000000000.0, "s")
|
(avg as f64 / 1000000000.0, "s")
|
||||||
|
|
Loading…
Reference in a new issue