mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
fix(analysis-stats): divided by zero error
This commit is contained in:
parent
2f8cd66fb4
commit
77be56b691
1 changed files with 3 additions and 3 deletions
|
@ -227,7 +227,7 @@ impl flags::AnalysisStats {
|
|||
fail += 1;
|
||||
}
|
||||
eprintln!("{:<20} {}", "Data layouts:", sw.elapsed());
|
||||
eprintln!("Failed data layouts: {fail} ({}%)", fail * 100 / all);
|
||||
eprintln!("Failed data layouts: {fail} ({}%)", percentage(fail, all));
|
||||
report_metric("failed data layouts", fail, "#");
|
||||
}
|
||||
|
||||
|
@ -254,7 +254,7 @@ impl flags::AnalysisStats {
|
|||
fail += 1;
|
||||
}
|
||||
eprintln!("{:<20} {}", "Const evaluation:", sw.elapsed());
|
||||
eprintln!("Failed const evals: {fail} ({}%)", fail * 100 / all);
|
||||
eprintln!("Failed const evals: {fail} ({}%)", percentage(fail, all));
|
||||
report_metric("failed const evals", fail, "#");
|
||||
}
|
||||
|
||||
|
@ -280,7 +280,7 @@ impl flags::AnalysisStats {
|
|||
fail += 1;
|
||||
}
|
||||
eprintln!("{:<20} {}", "MIR lowering:", sw.elapsed());
|
||||
eprintln!("Mir failed bodies: {fail} ({}%)", fail * 100 / all);
|
||||
eprintln!("Mir failed bodies: {fail} ({}%)", percentage(fail, all));
|
||||
report_metric("mir failed bodies", fail, "#");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue