Skip to content

Commit

Permalink
Merge branch 'main' into levm/transact-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
JereSalo authored Dec 2, 2024
2 parents fb1b0b7 + 6ff61be commit 2ef311a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmd/hive_report/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,15 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// Sort by file name.
results.sort_by(|a, b| a.0.cmp(&b.0));

for (file_name, passed, total) in results {
println!("- {}: {}/{}", file_name, passed, total);
for (file_name, passed, total) in &results {
let success_percentage = (*passed as f64 / *total as f64) * 100.0;
println!("{file_name}: {passed}/{total} ({success_percentage:.02}%)");
}
println!();
let total_passed = results.iter().map(|(_, p, _)| p).sum::<usize>();
let total_tests = results.iter().map(|(_, _, t)| t).sum::<usize>();
let total_percentage = (total_passed as f64 / total_tests as f64) * 100.0;
println!("Total: {total_passed}/{total_tests} ({total_percentage:.02}%)");

Ok(())
}

0 comments on commit 2ef311a

Please sign in to comment.