print how much time all tests took

This commit is contained in:
Dustin Carlino 2018-11-26 16:06:41 -08:00
parent f743b8cbaa
commit 8509b46b0b
2 changed files with 9 additions and 1 deletions

View File

@ -260,6 +260,7 @@ it?
I thought I had a list of these somewhere else?
- min length for lanes, turns
- length for related lanes (sidewalk spot / parking / driving) matching up
- connectivity
- no loop lanes (same src and dst endpt)... but what about cul-de-sacs then?

View File

@ -34,6 +34,7 @@ pub struct TestRunner {
results: Vec<TestResult>,
flags: Flags,
output_dir: String,
started_at: std::time::Instant,
}
struct TestResult {
@ -95,6 +96,7 @@ impl TestRunner {
.unwrap()
.as_secs()
),
started_at: std::time::Instant::now(),
}
}
@ -192,7 +194,12 @@ impl TestRunner {
}
}
println!("\n{} tests passed, {} tests failed", passed, failed);
println!(
"\n{} tests passed, {} tests failed in {:.02}s",
passed,
failed,
abstutil::elapsed_seconds(self.started_at)
);
}
}