mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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.
This commit is contained in:
@@ -328,11 +328,12 @@ def load_stats_dir(path, select_module=[], select_stat=[],
|
|||||||
for (k, v) in j.items():
|
for (k, v) in j.items():
|
||||||
if sre.search(k) is None:
|
if sre.search(k) is None:
|
||||||
continue
|
continue
|
||||||
|
if k.startswith('time.'):
|
||||||
|
v = int(1000000.0 * float(v))
|
||||||
if k.startswith('time.') and exclude_timers:
|
if k.startswith('time.') and exclude_timers:
|
||||||
continue
|
continue
|
||||||
tm = match_timerpat(k)
|
tm = match_timerpat(k)
|
||||||
if tm:
|
if tm:
|
||||||
v = int(1000000.0 * float(v))
|
|
||||||
if tm['jobkind'] == jobkind and \
|
if tm['jobkind'] == jobkind and \
|
||||||
tm['timerkind'] == 'wall':
|
tm['timerkind'] == 'wall':
|
||||||
dur_usec = v
|
dur_usec = v
|
||||||
|
|||||||
Reference in New Issue
Block a user