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

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..8f69f96ec73b0bfe8c422e5605ac65ce6bd05e80 100755
--- a/tools/perf/core/perf_data_generator.py
+++ b/tools/perf/core/perf_data_generator.py
@@ -853,17 +853,36 @@ def get_json_config_file_for_waterfall(waterfall):
return os.path.join(buildbot_dir, filename)
+def get_extras_json_config_file_for_waterfall(waterfall):
+ filename = '%s.extras.json' % waterfall['name']
+ buildbot_dir = os.path.join(path_util.GetChromiumSrcDir(), 'tools', 'perf')
+ return os.path.join(buildbot_dir, filename)
+
+
+def append_extra_tests(waterfall, tests):
martiniss 2017/07/06 22:11:22 Can you add a small docstring here?
yzshen1 2017/07/07 18:02:44 Done.
+ extra_config_file = get_extras_json_config_file_for_waterfall(waterfall)
+ 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 +893,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())
« tools/perf/chromium.perf.fyi.extras.json ('K') | « tools/perf/contrib/network_service/loading.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698