mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 09:23:44 +00:00
tools/add_cont_lines:
tools/appears:
tools/assemble:
tools/avg_frame_size:
tools/build_srcdist:
tools/cleanint:
tools/compare_frame_sizes:
tools/configure_mingw_cross:
tools/cont:
tools/ctor_rep_stats:
tools/cur_param:
tools/dd_speedtest:
tools/divide:
tools/extract_dd_stats:
tools/file_name_translation_stats:
tools/frame_sizes:
tools/gdbrun:
tools/half:
tools/info_stats.awk:
tools/linear:
tools/lmc.in:
tools/mai_stats:
tools/make_arena:
tools/next_param:
tools/not:
tools/optstages:
tools/type_ctor_stats:
Add vim mode lines. Replace tabs with spaces.
37 lines
1.0 KiB
Awk
Executable File
37 lines
1.0 KiB
Awk
Executable File
#!/usr/bin/awk -f
|
|
# vim: ft=awk ts=4 sw=4 et
|
|
BEGIN {
|
|
NUM_FIELDS = 100;
|
|
for (i = 0; i < NUM_FIELDS ; i++)
|
|
{
|
|
read[i] = 0;
|
|
same[i] = 0;
|
|
diff[i] = 0;
|
|
}
|
|
}
|
|
$1 == "stat_rsd" {
|
|
read[$2] += $3;
|
|
same[$2] += $4;
|
|
diff[$2] += $5;
|
|
}
|
|
END {
|
|
printf("%2s %9s %9s %9s %7s\n",
|
|
"i", "read", "same", "diff", "same%");
|
|
for (i = 0; i < NUM_FIELDS; i++)
|
|
{
|
|
if (read[i] != 0 || same[i] != 0 || diff[i] != 0)
|
|
{
|
|
printf("%2d %9d %9d %9d", i, read[i], same[i], diff[i]);
|
|
if (0 + same[i] + diff[i] > 0)
|
|
{
|
|
printf(" %6.2f%%\n",
|
|
(100.0 * same[i]) / (same[i] + diff[i]));
|
|
}
|
|
else
|
|
{
|
|
printf("\n");
|
|
}
|
|
}
|
|
}
|
|
}
|