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

Unified Diff: tools/buildbot/scripts/slave/chromium/dom_perf.py

Issue 171075: Addding reference build results for DOM perf tests... (Closed) Base URL: svn://chrome-svn/chrome/trunk/
Patch Set: Created 11 years, 4 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
« no previous file with comments | « src/chrome/test/url_fetch_test/url_fetch_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/buildbot/scripts/slave/chromium/dom_perf.py
===================================================================
--- tools/buildbot/scripts/slave/chromium/dom_perf.py (revision 23577)
+++ tools/buildbot/scripts/slave/chromium/dom_perf.py (working copy)
@@ -65,36 +65,54 @@
if options.target == 'Debug':
iterations = '&minIterations=1'
- # Windows used to write to the root of C:, but that doesn't work
- # on Vista so we write into the build folder instead.
- output_file = os.path.join(build_dir, options.target,
- 'dom_perf_result_%s.txt' % build_revision)
+ def run_and_print(use_refbuild):
+ # Windows used to write to the root of C:, but that doesn't work
+ # on Vista so we write into the build folder instead.
+ suffix = ''
+ if (use_refbuild):
+ suffix = '_ref'
+ output_file = os.path.join(build_dir, options.target,
+ 'dom_perf_result_%s%s.txt' % (build_revision,
+ suffix))
- url = URL % (dom_perf_dir, iterations, build_revision)
- url_flag = '--url=%s' % url
+ url = URL % (dom_perf_dir, iterations, build_revision)
+ url_flag = '--url=%s' % url
- command = [test_exe_path,
- '--wait_cookie_name=__domperf_finished',
- '--jsvar=__domperf_result',
- '--jsvar_output=%s' % output_file,
- url_flag]
+ command = [test_exe_path,
+ '--wait_cookie_name=__domperf_finished',
+ '--jsvar=__domperf_result',
+ '--jsvar_output=%s' % output_file,
+ url_flag]
+ if use_refbuild:
+ command.append('--reference_build')
- print "Executing: "
- print command
- result = chromium_utils.RunCommand(command)
+ print "Executing: "
+ print command
+ result = chromium_utils.RunCommand(command)
- # Open the resulting file and display it.
- file = open(output_file, 'r')
- data = json.loads(''.join(file.readlines()))
- file.close()
+ # Open the resulting file and display it.
+ file = open(output_file, 'r')
+ data = json.loads(''.join(file.readlines()))
+ file.close()
+ name = 'Total'
+ if use_refbuild:
+ name += '_ref'
+ print_result(True, name, data['BenchmarkRun']['totalScore'])
+ for suite in data['BenchmarkSuites']:
+ name = suite['name']
+ if use_refbuild:
+ name += '_ref'
+ print_result(False, name, suite['score'])
+
+ return result
+
+ result = run_and_print(False)
+ result &= run_and_print(True)
+
if chromium_utils.IsLinux():
slave_utils.StopVirtualX(options.target)
- print_result(True, 'Total', data['BenchmarkRun']['totalScore'])
- for suite in data['BenchmarkSuites']:
- print_result(False, suite['name'], suite['score'])
-
return result
« no previous file with comments | « src/chrome/test/url_fetch_test/url_fetch_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698