summaryrefslogtreecommitdiff
path: root/pt
diff options
context:
space:
mode:
authorJulian Blake Kongslie2023-01-15 15:17:15 -0800
committerJulian Blake Kongslie2023-01-15 15:17:15 -0800
commitdf7554610fdaed78a3ae1116384a162e5e34ddd6 (patch)
tree4375a8b4d08fc3fa6e4ddb7249a8a22595cba18f /pt
parentShow both cyc/evt and evt/cyc horizontal counters. (diff)
downloadnanosim-df7554610fdaed78a3ae1116384a162e5e34ddd6.tar.xz
Show which event each $horiz row is for at beginning and end of line.
Diffstat (limited to '')
-rwxr-xr-xpt5
1 files changed, 3 insertions, 2 deletions
diff --git a/pt b/pt
index c17d902..e3799c6 100755
--- a/pt
+++ b/pt
@@ -77,11 +77,12 @@ end
77flatten($hier) 77flatten($hier)
78 78
79rwidth = $order.map { | x | x.to_s.size }.max 79rwidth = $order.map { | x | x.to_s.size }.max
80rwidth = [rwidth, 3].max
80 81
81$horiz.keys.sort.each do | occ | 82$horiz.keys.sort.each do | occ |
82 $stdout.write(" " * rwidth + " #{$horiz[occ].ljust($maxtime)}") 83 $stdout.write("#{occ}:" + " " * (rwidth - 2) + " #{$horiz[occ].ljust($maxtime)}")
83 count = $horiz[occ].delete(" ").size 84 count = $horiz[occ].delete(" ").size
84 $stdout.write(" #{($maxtime.to_f / count.to_f).round(2).to_s.rjust(10)} cyc/evt #{(count.to_f / $maxtime.to_f).round(2).to_s.rjust(10)} evt/cyc\n") 85 $stdout.write(" :#{occ} #{($maxtime.to_f / count.to_f).round(2).to_s.rjust(10)} cyc/evt #{(count.to_f / $maxtime.to_f).round(2).to_s.rjust(10)} evt/cyc\n")
85end 86end
86$stdout.write("\n") 87$stdout.write("\n")
87 88