aboutsummaryrefslogtreecommitdiffstats
path: root/tools/cover.awk
diff options
context:
space:
mode:
Diffstat (limited to 'tools/cover.awk')
-rw-r--r--tools/cover.awk25
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/cover.awk b/tools/cover.awk
new file mode 100644
index 000000000..e4bb816dc
--- /dev/null
+++ b/tools/cover.awk
@@ -0,0 +1,25 @@
+BEGIN{
+ template = "%6s %-75s\n"
+ printf template, "Delta", "Module Path"
+}
+
+/^-/{
+ s = substr($1, 2)
+ x[s] = $3;
+};
+
+/^+/{
+ s = substr($1, 2)
+ d = $3
+ if (s in x)
+ d = d - x[s]
+ y[s" "d] = d
+}
+
+END{
+ asorti(y, z1, "@val_num_asc")
+ for (i=1; i <= length(z1); i++){
+ split(z1[i], z2, " ")
+ printf template, z2[2], z2[1]
+ }
+}