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

Unified Diff: tools/testing/perf_testing/run_perf_tests.py

Issue 10210010: Get rid of selfhosted test in perf tracking and fix for uploading data. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/perf_testing/run_perf_tests.py
===================================================================
--- tools/testing/perf_testing/run_perf_tests.py (revision 6913)
+++ tools/testing/perf_testing/run_perf_tests.py (working copy)
@@ -111,7 +111,7 @@
os.unlink(path)
# TODO(efortuna): building the sdk locally is a band-aid until all build XXX
# platform SDKs are hosted in Google storage. Pull from https://sandbox.
- # google.com/storage/?arg=dart-dump-render-tree#dart-dump-render-tree%2Fsdk
+ # google.com/storage/?arg=dart-dump-render-tree/sdk/#dart-dump-render-tree%2Fsdk
# eventually.
# TODO(efortuna): Currently always building ia32 architecture because we
# don't have test statistics for what's passing on x64. Eliminate arch
@@ -177,6 +177,8 @@
parser.add_option('--nobuild', '-n', dest='no_build', action='store_true',
help='Do not sync with the repository and do not '
'rebuild.', default=False)
+ parser.add_option('--upload', '-u', dest='upload', action='store_true',
+ help='Post the results of the run.', default=False)
parser.add_option('--verbose', '-v', dest='verbose', help='Print extra '
'debug output', action='store_true', default=False)
@@ -196,6 +198,7 @@
sys.exit(1)
self.suite_names = suites
self.no_build = args.no_build
+ self.upload = args.upload
self.verbose = args.verbose
return args.continuous
@@ -328,6 +331,10 @@
methods that many File Processor objects use. Any class that would like to be
a ProcessorVisitor must implement the process_file() method."""
+ SCORE = 'Score'
+ COMPILE_TIME = 'CompileTime'
+ CODE_SIZE = 'CodeSize'
+
def __init__(self, test):
self.test = test
@@ -336,7 +343,7 @@
pass
def report_results(self, benchmark_name, score, platform, variant,
- revision_number):
+ revision_number, metric):
"""Store the results of the benchmark run.
Args:
benchmark_name: The name of the individual benchmark.
@@ -348,8 +355,9 @@
dartium).
Returns: True if the post was successful."""
+ # TODO(efortuna): delete results file if returns True.
return post_results.report_results(benchmark_name, score, platform, variant,
- revision_number)
+ revision_number, metric)
class RuntimePerformanceTest(Test):
@@ -493,7 +501,9 @@
score = name_and_score[1].strip()
if version == 'js' or version == 'v8':
version = 'js'
- self.report_results(name, score, browser, version, revision_num)
+ if self.test.test_runner.upload:
+ self.report_results(name, score, browser, version, revision_num,
+ self.SCORE)
f.close()
@@ -659,7 +669,9 @@
r = re.match(result_pattern, result)
name = DromaeoTester.legalize_filename(r.group(1).strip(':'))
score = float(r.group(2))
- self.report_results(name, score, browser, version, revision_num)
+ if self.test.test_runner.upload:
+ self.report_results(name, score, browser, version,
+ revision_num, self.SCORE)
f.close()
@@ -771,20 +783,21 @@
num = int(num)
else:
num = float(num)
- self.report_results(metric, num, 'browser', variant, revision_num)
+ if self.test.test_runner.upload:
+ self.report_results(metric, num, 'browser', variant, revision_num,
+ self.CODE_SIZE)
f.close()
class CompileTimeAndSizeTest(Test):
- """Run tests to determine how long minfrog takes to compile, and the compiled
+ """Run tests to determine how long frogc takes to compile, and the compiled
file output size of some benchmarking files."""
def __init__(self, test_runner):
"""Reference to the test_runner object that notifies us when to begin
testing."""
super(CompileTimeAndSizeTest, self).__init__(
- self.name(), ['commandline'], ['frog'],
- ['Compiling on Dart VM', 'Bootstrapping', 'minfrog', 'swarm', 'total'],
+ self.name(), ['commandline'], ['frog'], ['swarm', 'total'],
test_runner, self.CompileTester(self),
self.CompileProcessor(self))
self.dart_compiler = os.path.join(
@@ -796,9 +809,7 @@
self.dart_vm = os.path.join(
DART_INSTALL_LOCATION, utils.GetBuildRoot(utils.GuessOS(),
'release', 'ia32'), 'dart-sdk', 'bin','dart' + _suffix)
- self.failure_threshold = {
- 'Compiling on Dart VM' : 1, 'Bootstrapping' : .5, 'minfrog' : 100,
- 'swarm' : 100, 'total' : 100}
+ self.failure_threshold = {'swarm' : 100, 'total' : 100}
@staticmethod
def name():
@@ -814,29 +825,8 @@
self.add_svn_revision_to_trace(self.test.trace_file)
- elapsed = self.test.test_runner.time_cmd(
- [self.test.dart_vm, os.path.join('.', 'minfrogc.dart'),
- '--out=minfrog', 'minfrog.dart'])
self.test.test_runner.run_cmd(
- ['echo', '%f Compiling on Dart VM in production mode in seconds'
- % elapsed], self.test.trace_file, append=True)
- elapsed = self.test.test_runner.time_cmd(
- [os.path.join('.', 'minfrog'), '--out=minfrog', 'minfrog.dart',
- os.path.join('tests', 'hello.dart')])
- if elapsed < self.test.failure_threshold['Bootstrapping']:
- #minfrog didn't compile correctly. Stop testing now, because subsequent
- #numbers will be meaningless.
- return
- size = os.path.getsize('minfrog')
- self.test.test_runner.run_cmd(
- ['echo', '%f Bootstrapping time in seconds in production mode' %
- elapsed], self.test.trace_file, append=True)
- self.test.test_runner.run_cmd(
- ['echo', '%d Generated checked minfrog size' % size],
- self.test.trace_file, append=True)
-
- self.test.test_runner.run_cmd(
- [self.test.dart_compiler, '--out=swarm-result',
+ [self.test.dart_vm, 'frogc.dart', '--out=swarm-result',
os.path.join('..', 'samples', 'swarm',
'swarm.dart')])
@@ -847,7 +837,7 @@
pass #If compilation failed, continue on running other tests.
self.test.test_runner.run_cmd(
- [self.test.dart_compiler, '--out=total-result',
+ [self.test.dart_vm, 'frogc.dart', '--out=total-result',
os.path.join('..', 'samples', 'total',
'client', 'Total.dart')])
total_size = 0
@@ -864,9 +854,6 @@
['echo', '%d Generated checked total size' % total_size],
self.test.trace_file, append=True)
- #Revert our newly built minfrog to prevent conflicts when we update
- self.test.test_runner.run_cmd(
- ['svn', 'revert', os.path.join(os.getcwd(), 'minfrog')])
os.chdir('..')
@@ -894,8 +881,12 @@
num = int(num)
else:
num = float(num)
- self.report_results(metric, num, 'commandline', 'frog',
- revision_num)
+ score_type = self.CODE_SIZE
+ if 'Compiling' in metric or 'Bootstrapping' in metric:
+ score_type = self.COMPILE_TIME
+ if self.test.test_runner.upload:
+ self.report_results(metric, num, 'commandline', 'frog',
+ revision_num, score_type)
ricow1 2012/04/25 08:42:18 indentation off
f.close()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698