mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-15 22:03:26 +00:00
Add an overall percentage display, and use a float format for counts
Estimated hours taken: 0.1 tools/ctor_rep_stats: Add an overall percentage display, and use a float format for counts to avoid clipping at 2^31-1(!).
This commit is contained in:
@@ -10,9 +10,9 @@ END {
|
|||||||
{
|
{
|
||||||
for (r in rep)
|
for (r in rep)
|
||||||
{
|
{
|
||||||
printf "%-8s %-20s %15d (%5.2f%%)\n", p, r ":", kind[p "-" r], (100 * kind[p "-" r]) / pred[p];
|
printf "%-8s %-20s %15.0f (%5.2f%%, %5.2f%%)\n", p, r ":", kind[p "-" r], (100 * kind[p "-" r]) / pred[p], (100 * kind[p "-" r]) / all;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf "%-29s %15d (%5.2f%%)\n\n", p ":", pred[p], (100 * pred[p]) / all;
|
printf "%-29s %15.0f (%7s %5.2f%%)\n\n", p ":", pred[p], "", (100 * pred[p]) / all;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user