Clean up the benchmark a little bit.

This commit is contained in:
Toby Lawrence 2019-04-05 11:39:30 -04:00
parent a2769cd65e
commit d405cdeaf2
1 changed files with 5 additions and 13 deletions

View File

@ -202,20 +202,12 @@ fn main() {
.unwrap() .unwrap()
.into_measurements() .into_measurements()
.iter() .iter()
.fold(0, |mut acc, m| { .fold(0, |acc, m| {
match m { acc + match m {
TypedMeasurement::Counter(key, value) => { TypedMeasurement::Counter(_key, value) => *value,
println!("got counter {} -> {}", key, value); TypedMeasurement::Gauge(_key, value) => *value as u64,
acc += *value; _ => 0,
}
TypedMeasurement::Gauge(key, value) => {
println!("got counter {} -> {}", key, value);
acc += *value as u64;
}
_ => {}
} }
acc
}); });
let turn_delta = turn_total - total; let turn_delta = turn_total - total;