Rex Bench doesn't work from the command line
authormsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Aug 2017 22:33:27 +0000 (22:33 +0000)
committermsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Aug 2017 22:33:27 +0000 (22:33 +0000)
commitab74805df807a5b9872a1bd377f5f319016e6297
treeaf3a08f39b38be58342430f1d30b78712ee8cf5a
parentd7418a3fda32bb7f747f62377cc1f0f319c85700
Rex Bench doesn't work from the command line
https://bugs.webkit.org/show_bug.cgi?id=175349

Reviewed by Saam Barati.

Fixed cli.js to have the same set of benchmarks and .js files as the web
page driver.

Refactored the way benchmarks are run using a new Benchmark base class.  That
class will run the benchmark as well.  Eliminated the various runBenchmark()
functions that were used for individual tests.  This refactoring was threaded
into the web page driver as well.  Changed the iteration counts on many of the
individual benchmarks.  Also changed the inner loop count for the flight
planner test.

Eliminated Octane2/base.js as it isn't needed to run Octane2/RegExp with the
new test harness.  Eliminated other dead code in Octane2/regexp.js.

* RexBench/Basic/benchmark.js:
(BasicBenchmark):
(BasicBenchmark.prototype.runIteration): Deleted.
(runBenchmark): Deleted.
* RexBench/FlightPlanner/benchmark.js:
(FlightPlannerBenchmark):
(FlightPlannerBenchmark.prototype.runOnce):
(this.performance.performance.now.currentTime): Deleted.
(else.this.preciseTime.currentTime): Deleted.
(else.currentTime): Deleted.
(FlightPlannerBenchmark.prototype.runIteration): Deleted.
(FlightPlannerBenchmark.prototype.checkResults): Deleted.
(runBenchmark): Deleted.
* RexBench/Octane2/base.js: Removed.
* RexBench/Octane2/regexp.js:
* RexBench/basic_benchmark.js:
* RexBench/benchmark.js: Added.
(this.performance.performance.now.currentTime):
(else.this.preciseTime.currentTime):
(else.currentTime):
(Benchmark):
(Benchmark.prototype.runIterations):
(Benchmark.prototype.setup):
(Benchmark.prototype.runOnce):
(Benchmark.prototype.validate):
(Benchmark.prototype.tearDown):
* RexBench/cli.js:
* RexBench/flightplan_benchmark.js:
* RexBench/flightplan_unicode_benchmark.js:
* RexBench/octane2_benchmark.js:
* RexBench/stats.js:
(Stats.prototype.toString.return.span.0.span.span):
* RexBench/sunspider_benchmark.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
PerformanceTests/ChangeLog
PerformanceTests/RexBench/Basic/benchmark.js
PerformanceTests/RexBench/FlightPlanner/benchmark.js
PerformanceTests/RexBench/Octane2/base.js [deleted file]
PerformanceTests/RexBench/Octane2/regexp.js
PerformanceTests/RexBench/basic_benchmark.js
PerformanceTests/RexBench/benchmark.js [new file with mode: 0644]
PerformanceTests/RexBench/cli.js
PerformanceTests/RexBench/flightplan_benchmark.js
PerformanceTests/RexBench/flightplan_unicode_benchmark.js
PerformanceTests/RexBench/octane2_benchmark.js
PerformanceTests/RexBench/stats.js
PerformanceTests/RexBench/sunspider_benchmark.js