diff options
author | Leon Rische <leon.rische@me.com> | 2020-04-29 23:01:11 +0200 |
---|---|---|
committer | Leon Rische <leon.rische@me.com> | 2020-05-01 14:13:20 +0200 |
commit | c53af60c891fa06b285e2cbba40b60fcb3419aaf (patch) | |
tree | 74c0e43ecf280ed0508b5866e352f87cda5d08a7 /awk/stats_positions.awk | |
parent | f7114a4c40d79d6a0750416b0444c2147136e110 (diff) |
Generate S-expressions in stats awk scripts
Diffstat (limited to 'awk/stats_positions.awk')
-rw-r--r-- | awk/stats_positions.awk | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/awk/stats_positions.awk b/awk/stats_positions.awk index 735013a..c276f87 100644 --- a/awk/stats_positions.awk +++ b/awk/stats_positions.awk @@ -33,20 +33,22 @@ BEGIN { } END { - print "total" "\t" total; - print "suspended" "\t" suspended; - print "due" "\t" due; + print "(" + print " :total " total; + print " :suspended " suspended; + print " :due " due; for (var in by_type) { - print "type-" var "\t" by_type[var]; + print " :type-" var " " by_type[var]; } if (n_stats > 0) { - print "avg-ease" "\t" ease / n_stats; - print "avg-box" "\t" box / n_stats; - print "avg-interval" "\t" interval / n_stats; + print " :avg-ease " ease / n_stats; + print " :avg-box " box / n_stats; + print " :avg-interval " interval / n_stats; } else { - print "avg-ease" "\t" 0.0; - print "avg-box" "\t" 0; - print "avg-interval" "\t" 0.0; + print " :avg-ease " 0.0; + print " :avg-box " 0; + print " :avg-interval " 0.0; } + print ")" } |