Skip to content

Commit 92073c6

Browse files
committed
[Stats] Fix a second/nanoseconds bug in process-stats-dir
Times are expected to be represented in nanoseconds in process-stats-dir, but times with the 'swift.time.' prefix (e.g. times for specific requests) were not converted. It appears the reasons that this hasn’t been caught so far, is that these times are not shown in Swift-CI's please test compiler performance report.
1 parent 6c41322 commit 92073c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utils/jobstats/jobstats.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,12 @@ def load_stats_dir(path, select_module=[], select_stat=[],
328328
for (k, v) in j.items():
329329
if sre.search(k) is None:
330330
continue
331+
if k.startswith('time.'):
332+
v = int(1000000.0 * float(v))
331333
if k.startswith('time.') and exclude_timers:
332334
continue
333335
tm = match_timerpat(k)
334336
if tm:
335-
v = int(1000000.0 * float(v))
336337
if tm['jobkind'] == jobkind and \
337338
tm['timerkind'] == 'wall':
338339
dur_usec = v

0 commit comments

Comments
 (0)