Show More
@@ -111,12 +111,23 b' def idxwidth(nbidx):' | |||||
111 | def printresult(idx, data, maxidx): |
|
111 | def printresult(idx, data, maxidx): | |
112 | """print a line of result to stdout""" |
|
112 | """print a line of result to stdout""" | |
113 | mask = '%%0%ii) %%s' % idxwidth(maxidx) |
|
113 | mask = '%%0%ii) %%s' % idxwidth(maxidx) | |
|
114 | out = ['%10.6f' % data['wall'], | |||
|
115 | '%10.6f' % data['comb'], | |||
|
116 | '%10.6f' % data['user'], | |||
|
117 | '%10.6f' % data['sys'], | |||
|
118 | '%6d' % data['count'], | |||
|
119 | ] | |||
|
120 | print mask % (idx, ' '.join(out)) | |||
114 |
|
121 | |||
115 | out = ("wall %f comb %f user %f sys %f (best of %d)" |
|
122 | def printheader(maxidx): | |
116 | % (data['wall'], data['comb'], data['user'], |
|
123 | header = [' ' * (idxwidth(maxidx) + 1), | |
117 | data['sys'], data['count'])) |
|
124 | ' %-8s' % 'wall', | |
118 |
|
125 | ' %-8s' % 'comb', | ||
119 | print mask % (idx, out) |
|
126 | ' %-8s' % 'user', | |
|
127 | ' %-8s' % 'sys', | |||
|
128 | '%6s' % 'count', | |||
|
129 | ] | |||
|
130 | print ' '.join(header) | |||
120 |
|
131 | |||
121 | def getrevs(spec): |
|
132 | def getrevs(spec): | |
122 | """get the list of rev matched by a revset""" |
|
133 | """get the list of rev matched by a revset""" | |
@@ -172,6 +183,7 b' for r in revs:' | |||||
172 | update(r) |
|
183 | update(r) | |
173 | res = [] |
|
184 | res = [] | |
174 | results.append(res) |
|
185 | results.append(res) | |
|
186 | printheader(len(revsets)) | |||
175 | for idx, rset in enumerate(revsets): |
|
187 | for idx, rset in enumerate(revsets): | |
176 | data = perf(rset, target=options.repo) |
|
188 | data = perf(rset, target=options.repo) | |
177 | res.append(data) |
|
189 | res.append(data) | |
@@ -198,6 +210,7 b' print' | |||||
198 | for ridx, rset in enumerate(revsets): |
|
210 | for ridx, rset in enumerate(revsets): | |
199 |
|
211 | |||
200 | print "revset #%i: %s" % (ridx, rset) |
|
212 | print "revset #%i: %s" % (ridx, rset) | |
|
213 | printheader(len(results)) | |||
201 | for idx, data in enumerate(results): |
|
214 | for idx, data in enumerate(results): | |
202 | printresult(idx, data[ridx], len(results)) |
|
215 | printresult(idx, data[ridx], len(results)) | |
203 |
|
216 |
General Comments 0
You need to be logged in to leave comments.
Login now