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__):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184431
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-05-15 Ryosuke Niwa <rniwa@webkit.org>
+
+ 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 <timothy_horton@apple.com>
Temporarily disable failing API test.
parser.add_argument('--browser', dest='browser', required=True, choices=BrowserDriverFactory.available_browsers())
parser.add_argument('--debug', action='store_true')
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:
_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()
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)
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