Skip to content

Commit 62c3282

Browse files
authored
Merge pull request swiftlang#175 from graydon/misc-cperf-tweaks
Misc cperf tweaks
2 parents f07563e + d16951a commit 62c3282

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

run_cperf

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def get_projects(suite):
242242

243243
def get_configs(suite):
244244
if suite == 'full':
245-
return ['debug', 'debug-opt', 'wmo-onone', 'release']
245+
return ['debug-batch', 'release']
246246
elif suite == 'smoketest':
247247
return ['debug', 'release']
248248
else:
@@ -263,6 +263,9 @@ def get_actual_config_and_flags(config, stats):
263263
elif config == 'debug-opt':
264264
flags += ' -O '
265265
config = 'debug'
266+
elif config == 'debug-batch':
267+
flags += ' -enable-batch-mode '
268+
config = 'debug'
266269
return (config, flags)
267270

268271

@@ -289,7 +292,6 @@ def execute_runner(instance, workspace, configs, args):
289292
'--swiftc', swiftc_path,
290293
'--projects', projects,
291294
'--build-config', config,
292-
'--swift-version', '3',
293295
'--include-actions', actions,
294296
'--swift-branch', args.swift_branch,
295297
'--add-swift-flags', flags,
@@ -359,9 +361,14 @@ def all_driver_stats_files(configs, args):
359361
for f in files:
360362
m = re.match(r'stats-\d+-swift-driver-([^-]+).*\.json', f)
361363
if m:
362-
with open(os.path.join(root, f)) as fp:
363-
j = json.load(fp)
364-
yield (m.group(1), j)
364+
try:
365+
with open(os.path.join(root, f)) as fp:
366+
j = json.load(fp)
367+
yield (m.group(1), j)
368+
except ValueError:
369+
# Something sufficiently bad happened that
370+
# we can't read the json: build a fake one.
371+
yield (m.group(1), {})
365372

366373

367374
def find_module_statuses(configs, args):
@@ -549,7 +556,11 @@ def parse_args():
549556
help='cperf suite to run',
550557
default='smoketest')
551558
parser.add_argument("--verbose",
552-
action='store_true')
559+
action='store_true',
560+
default=True)
561+
parser.add_argument("--quiet",
562+
action='store_false',
563+
dest='verbose')
553564
parser.add_argument('--skip-build',
554565
action='store_true')
555566
parser.add_argument('--skip-runner',
@@ -570,7 +581,7 @@ def parse_args():
570581
parser.add_argument('--new-swiftc',
571582
type=str, default=None)
572583
parser.add_argument('--repetitions',
573-
type=int, default=3)
584+
type=int, default=2)
574585
parser.add_argument('--show-baselines',
575586
type=bool, default=False)
576587
parser.add_argument('--group-by-module',

0 commit comments

Comments
 (0)