Modified: trunk/Tools/ChangeLog (184430 => 184431)
--- trunk/Tools/ChangeLog 2015-05-16 04:24:48 UTC (rev 184430)
+++ trunk/Tools/ChangeLog 2015-05-16 06:42:45 UTC (rev 184431)
@@ -1,3 +1,17 @@
+2015-05-15 Ryosuke Niwa <[email protected]>
+
+ run_benchmark should have an option to specify the number of runs
+ https://bugs.webkit.org/show_bug.cgi?id=145091
+
+ Reviewed by Stephanie Lewis.
+
+ Added --count option.
+
+ * Scripts/run-benchmark:
+ (main):
+ * Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
+ (BenchmarkRunner.__init__):
+
2015-05-15 Timothy Horton <[email protected]>
Temporarily disable failing API test.
Modified: trunk/Tools/Scripts/run-benchmark (184430 => 184431)
--- trunk/Tools/Scripts/run-benchmark 2015-05-16 04:24:48 UTC (rev 184430)
+++ trunk/Tools/Scripts/run-benchmark 2015-05-16 06:42:45 UTC (rev 184431)
@@ -27,6 +27,7 @@
parser.add_argument('--browser', dest='browser', required=True, choices=BrowserDriverFactory.available_browsers())
parser.add_argument('--debug', action='')
parser.add_argument('--local-copy', dest='localCopy', help='Path to a local copy of the benchmark. e.g. PerformanceTests/SunSpider/')
+ parser.add_argument('--count', dest='countOverride', type=int, help='Number of times to run the benchmark. e.g. 5')
args = parser.parse_args()
if args.debug:
@@ -35,7 +36,7 @@
_log.debug('\toutput file name\t: %s' % args.output)
_log.debug('\tbuild directory\t: %s' % args.buildDir)
_log.debug('\tplan name\t: %s', args.plan)
- runner = BenchmarkRunner(args.plan, args.localCopy, args.buildDir, args.output, args.platform, args.browser)
+ runner = BenchmarkRunner(args.plan, args.localCopy, args.countOverride, args.buildDir, args.output, args.platform, args.browser)
return runner.execute()
Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py (184430 => 184431)
--- trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py 2015-05-16 04:24:48 UTC (rev 184430)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py 2015-05-16 06:42:45 UTC (rev 184431)
@@ -23,7 +23,7 @@
class BenchmarkRunner(object):
- def __init__(self, planFile, localCopy, buildDir, outputFile, platform, browser):
+ def __init__(self, planFile, localCopy, countOverride, buildDir, outputFile, platform, browser):
_log.info('Initializing benchmark running')
try:
planFile = self._findPlanFile(planFile)
@@ -32,6 +32,8 @@
self.plan = json.load(fp)
if localCopy:
self.plan['local_copy'] = localCopy
+ if countOverride:
+ self.plan['count'] = countOverride
self.browserDriver = BrowserDriverFactory.create([platform, browser])
self.httpServerDriver = HTTPServerDriverFactory.create([self.plan['http_server_driver']])
self.buildDir = os.path.abspath(buildDir) if buildDir else None