Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: tools/perf/core/perf_data_generator.py

Issue 2973733002: Enable loading.desktop benchmark with network service enabled on perf fyi bot. (Closed)
Patch Set: . Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/perf/core/perf_data_generator.py
diff --git a/tools/perf/core/perf_data_generator.py b/tools/perf/core/perf_data_generator.py
index a4119dee1456ca5d161a5d7989fb466aeb7615bc..3bd96dafbc4c8f1df4e4d6ce30cfdfc9301f752b 100755
--- a/tools/perf/core/perf_data_generator.py
+++ b/tools/perf/core/perf_data_generator.py
@@ -846,24 +846,38 @@ def generate_all_tests(waterfall):
return tests
-def get_json_config_file_for_waterfall(waterfall):
- filename = '%s.json' % waterfall['name']
+def get_json_config_file_for_waterfall(waterfall, filename_suffix=None):
+ filename = '%s%s.json' % (waterfall['name'],
+ filename_suffix if filename_suffix else "")
buildbot_dir = os.path.join(
path_util.GetChromiumSrcDir(), 'testing', 'buildbot')
return os.path.join(buildbot_dir, filename)
+def append_extra_tests(waterfall, tests):
+ extra_config_file = get_json_config_file_for_waterfall(waterfall, '.extras')
+ if os.path.isfile(extra_config_file):
+ with open(extra_config_file) as extra_fp:
+ extra_tests = json.load(extra_fp)
+ for key, value in extra_tests.iteritems():
+ assert key not in tests
+ tests[key] = value
+
+
def tests_are_up_to_date(waterfalls):
up_to_date = True
all_tests = {}
for w in waterfalls:
tests = generate_all_tests(w)
+ # Note: |all_tests| don't cover those manually-specified tests added by
+ # append_extra_tests().
+ all_tests.update(tests)
+ append_extra_tests(w, tests)
tests_data = json.dumps(tests, indent=2, separators=(',', ': '),
sort_keys=True)
config_file = get_json_config_file_for_waterfall(w)
with open(config_file, 'r') as fp:
config_data = fp.read().strip()
- all_tests.update(tests)
up_to_date &= tests_data == config_data
verify_all_tests_in_benchmark_csv(all_tests,
get_all_waterfall_benchmarks_metadata())
@@ -874,11 +888,14 @@ def update_all_tests(waterfalls):
all_tests = {}
for w in waterfalls:
tests = generate_all_tests(w)
+ # Note: |all_tests| don't cover those manually-specified tests added by
+ # append_extra_tests().
+ all_tests.update(tests)
+ append_extra_tests(w, tests)
config_file = get_json_config_file_for_waterfall(w)
with open(config_file, 'w') as fp:
json.dump(tests, fp, indent=2, separators=(',', ': '), sort_keys=True)
fp.write('\n')
- all_tests.update(tests)
verify_all_tests_in_benchmark_csv(all_tests,
get_all_waterfall_benchmarks_metadata())

Powered by Google App Engine
This is Rietveld 408576698