aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2017-03-14 07:39:50 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2017-03-14 07:39:50 -0400
commit94524ed4ce3560d765fb8b4e6d3a2ebec69dfbc2 (patch)
treee9ce31d6c8fcef994542c840c7ba0f61e8a1c25d
parent6ac3eeb8d0fd3ae3736a7766f99a8bcd4749c235 (diff)
ft-compute-stats: list scale and units in separate columns
-rwxr-xr-xft-compute-stats11
1 files changed, 7 insertions, 4 deletions
diff --git a/ft-compute-stats b/ft-compute-stats
index a380305..182916a 100755
--- a/ft-compute-stats
+++ b/ft-compute-stats
@@ -132,7 +132,7 @@ def to_str(x):
132 return "%.5f" % x 132 return "%.5f" % x
133 133
134STATS_HEADERS = [ 134STATS_HEADERS = [
135 "Plugin", "#cores", "Overhead", 'Unit', "#tasks", 135 "Plugin", "#cores", "Overhead", 'Unit', 'Scale', "#tasks",
136 "#samples", 136 "#samples",
137 "max", "99.9th perc.", "99th perc.", "95th perc.", 137 "max", "99.9th perc.", "99th perc.", "95th perc.",
138 "avg", "med", "min", "std", "var", 138 "avg", "med", "min", "std", "var",
@@ -146,14 +146,17 @@ def get_stats(fname):
146 if 'overhead' in conf and conf['overhead'].rfind('-LATENCY') != -1: 146 if 'overhead' in conf and conf['overhead'].rfind('-LATENCY') != -1:
147 # latency is stored in nanoseconds, not cycles 147 # latency is stored in nanoseconds, not cycles
148 scale = 1 / 1000 # convert from nanoseconds 148 scale = 1 / 1000 # convert from nanoseconds
149 unit = 'microseconds (scale = 1/1000)' 149 unit = 'microseconds'
150 scale_desc = '1/1000.00'
150 elif options.cycles is None: 151 elif options.cycles is None:
151 scale = 1 152 scale = 1
152 unit = 'cycles' 153 unit = 'cycles'
154 scale_desc = '1'
153 else: 155 else:
154 # convert from cycles to usec 156 # convert from cycles to usec
155 scale = 1 / options.cycles 157 scale = 1 / options.cycles
156 unit = 'microseconds (scale = 1/%f)' % options.cycles 158 unit = 'microseconds'
159 scale_desc = '1/%.2f' % options.cycles
157 160
158 stats = stats_for_file(fname, scale) 161 stats = stats_for_file(fname, scale)
159 if 'locks' in conf: 162 if 'locks' in conf:
@@ -167,7 +170,7 @@ def get_stats(fname):
167 n = conf['n'] if 'n' in conf else '*' 170 n = conf['n'] if 'n' in conf else '*'
168 m = conf['m'] if 'm' in conf else '*' 171 m = conf['m'] if 'm' in conf else '*'
169 172
170 info = [sched, m, ohead, unit, n] 173 info = [sched, m, ohead, unit, scale_desc, n]
171 finfo = [fname] 174 finfo = [fname]
172 return [to_str(x) for x in info + stats + finfo] 175 return [to_str(x) for x in info + stats + finfo]
173 176