diff options
| author | Julian Blake Kongslie | 2023-01-15 15:17:15 -0800 |
|---|---|---|
| committer | Julian Blake Kongslie | 2023-01-15 15:17:15 -0800 |
| commit | df7554610fdaed78a3ae1116384a162e5e34ddd6 (patch) | |
| tree | 4375a8b4d08fc3fa6e4ddb7249a8a22595cba18f | |
| parent | Show both cyc/evt and evt/cyc horizontal counters. (diff) | |
| download | nanosim-df7554610fdaed78a3ae1116384a162e5e34ddd6.tar.xz | |
Show which event each $horiz row is for at beginning and end of line.
| -rwxr-xr-x | pt | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -77,11 +77,12 @@ end | |||
| 77 | flatten($hier) | 77 | flatten($hier) |
| 78 | 78 | ||
| 79 | rwidth = $order.map { | x | x.to_s.size }.max | 79 | rwidth = $order.map { | x | x.to_s.size }.max |
| 80 | rwidth = [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") |
| 85 | end | 86 | end |
| 86 | $stdout.write("\n") | 87 | $stdout.write("\n") |
| 87 | 88 | ||
