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()
.into_measurements()
.iter()
.fold(0, |mut acc, m| {
match m {
TypedMeasurement::Counter(key, value) => {
println!("got counter {} -> {}", key, value);
acc += *value;
}
TypedMeasurement::Gauge(key, value) => {
println!("got counter {} -> {}", key, value);
acc += *value as u64;
}
_ => {}
.fold(0, |acc, m| {
acc + match m {
TypedMeasurement::Counter(_key, value) => *value,
TypedMeasurement::Gauge(_key, value) => *value as u64,
_ => 0,
}
acc
});
let turn_delta = turn_total - total;