haikuwebkit/PerformanceTests/RexBench/flightplan_unicode_benchmar...

75 lines
2.9 KiB
JavaScript
Raw Permalink Normal View History

Create a new JavaScript RegExp benchmark https://bugs.webkit.org/show_bug.cgi?id=175225 Reviewed by JF Bastien. This is a new benchmark for Regular Expressions. It borrows regex-dna from SunSpider, the regexp test from Octane2, the BASIC parser from ARES-6/Basic, and adds a new flight planner benchmark that uses RegExp's for textual parsing. There needs to be some additions and changes to some of the textual content. This includes adding more BASIC programs to the Basic test and increasing keyword usage in the Flight Planner to increase the 16-bit coverage. The intent is to grow this benchmark by adding a JavaScript implementation of the offline assembler lexer and parser as well as adding some targeted micro benchmark tests. * RexBench: Added. * RexBench/Basic: Added. * RexBench/Basic/ast.js: Added. * RexBench/Basic/basic.js: Added. * RexBench/Basic/benchmark.js: Added. * RexBench/Basic/caseless_map.js: Added. * RexBench/Basic/lexer.js: Added. * RexBench/Basic/number.js: Added. * RexBench/Basic/parser.js: Added. * RexBench/Basic/random.js: Added. * RexBench/Basic/state.js: Added. * RexBench/Basic/stress-test.js: Added. * RexBench/Basic/util.js: Added. * RexBench/FlightPlanner: Added. * RexBench/FlightPlanner/airways.js: Added. * RexBench/FlightPlanner/benchmark.js: Added. * RexBench/FlightPlanner/convert-nfdc.py: Added. * RexBench/FlightPlanner/expectations.js: Added. * RexBench/FlightPlanner/flight_planner.js: Added. * RexBench/FlightPlanner/use_unicode.js: Added. * RexBench/FlightPlanner/waypoints.js: Added. * RexBench/Octane2: Added. * RexBench/Octane2/base.js: Added. * RexBench/Octane2/regexp.js: Added. * RexBench/SunSpider: Added. * RexBench/SunSpider/regex-dna.js: Added. * RexBench/about.html: Added. * RexBench/basic_benchmark.js: Added. * RexBench/cli.js: Added. * RexBench/driver.js: Added. * RexBench/flightplan_benchmark.js: Added. * RexBench/flightplan_unicode_benchmark.js: Added. * RexBench/glue.js: Added. * RexBench/index.html: Added. * RexBench/octane2_benchmark.js: Added. * RexBench/results.js: Added. * RexBench/stats.js: Added. * RexBench/styles.css: Added. * RexBench/sunspider_benchmark.js: Added. Canonical link: https://commits.webkit.org/191963@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-05 00:20:23 +00:00
/*
* Copyright (C) 2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
"use strict";
const FlightPlannerUnicodeBenchmarkCode = String.raw`
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: Canonical link: https://commits.webkit.org/192107@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-09 22:33:27 +00:00
<script src="benchmark.js"></script>
Create a new JavaScript RegExp benchmark https://bugs.webkit.org/show_bug.cgi?id=175225 Reviewed by JF Bastien. This is a new benchmark for Regular Expressions. It borrows regex-dna from SunSpider, the regexp test from Octane2, the BASIC parser from ARES-6/Basic, and adds a new flight planner benchmark that uses RegExp's for textual parsing. There needs to be some additions and changes to some of the textual content. This includes adding more BASIC programs to the Basic test and increasing keyword usage in the Flight Planner to increase the 16-bit coverage. The intent is to grow this benchmark by adding a JavaScript implementation of the offline assembler lexer and parser as well as adding some targeted micro benchmark tests. * RexBench: Added. * RexBench/Basic: Added. * RexBench/Basic/ast.js: Added. * RexBench/Basic/basic.js: Added. * RexBench/Basic/benchmark.js: Added. * RexBench/Basic/caseless_map.js: Added. * RexBench/Basic/lexer.js: Added. * RexBench/Basic/number.js: Added. * RexBench/Basic/parser.js: Added. * RexBench/Basic/random.js: Added. * RexBench/Basic/state.js: Added. * RexBench/Basic/stress-test.js: Added. * RexBench/Basic/util.js: Added. * RexBench/FlightPlanner: Added. * RexBench/FlightPlanner/airways.js: Added. * RexBench/FlightPlanner/benchmark.js: Added. * RexBench/FlightPlanner/convert-nfdc.py: Added. * RexBench/FlightPlanner/expectations.js: Added. * RexBench/FlightPlanner/flight_planner.js: Added. * RexBench/FlightPlanner/use_unicode.js: Added. * RexBench/FlightPlanner/waypoints.js: Added. * RexBench/Octane2: Added. * RexBench/Octane2/base.js: Added. * RexBench/Octane2/regexp.js: Added. * RexBench/SunSpider: Added. * RexBench/SunSpider/regex-dna.js: Added. * RexBench/about.html: Added. * RexBench/basic_benchmark.js: Added. * RexBench/cli.js: Added. * RexBench/driver.js: Added. * RexBench/flightplan_benchmark.js: Added. * RexBench/flightplan_unicode_benchmark.js: Added. * RexBench/glue.js: Added. * RexBench/index.html: Added. * RexBench/octane2_benchmark.js: Added. * RexBench/results.js: Added. * RexBench/stats.js: Added. * RexBench/styles.css: Added. * RexBench/sunspider_benchmark.js: Added. Canonical link: https://commits.webkit.org/191963@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-05 00:20:23 +00:00
<script src="FlightPlanner/airways.js"></script>
<script src="FlightPlanner/waypoints.js"></script>
<script src="FlightPlanner/use_unicode.js"></script>
<script src="FlightPlanner/flight_planner.js"></script>
<script src="FlightPlanner/expectations.js"></script>
<script src="FlightPlanner/benchmark.js"></script>
<script>
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: Canonical link: https://commits.webkit.org/192107@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-09 22:33:27 +00:00
"use strict";
Create a new JavaScript RegExp benchmark https://bugs.webkit.org/show_bug.cgi?id=175225 Reviewed by JF Bastien. This is a new benchmark for Regular Expressions. It borrows regex-dna from SunSpider, the regexp test from Octane2, the BASIC parser from ARES-6/Basic, and adds a new flight planner benchmark that uses RegExp's for textual parsing. There needs to be some additions and changes to some of the textual content. This includes adding more BASIC programs to the Basic test and increasing keyword usage in the Flight Planner to increase the 16-bit coverage. The intent is to grow this benchmark by adding a JavaScript implementation of the offline assembler lexer and parser as well as adding some targeted micro benchmark tests. * RexBench: Added. * RexBench/Basic: Added. * RexBench/Basic/ast.js: Added. * RexBench/Basic/basic.js: Added. * RexBench/Basic/benchmark.js: Added. * RexBench/Basic/caseless_map.js: Added. * RexBench/Basic/lexer.js: Added. * RexBench/Basic/number.js: Added. * RexBench/Basic/parser.js: Added. * RexBench/Basic/random.js: Added. * RexBench/Basic/state.js: Added. * RexBench/Basic/stress-test.js: Added. * RexBench/Basic/util.js: Added. * RexBench/FlightPlanner: Added. * RexBench/FlightPlanner/airways.js: Added. * RexBench/FlightPlanner/benchmark.js: Added. * RexBench/FlightPlanner/convert-nfdc.py: Added. * RexBench/FlightPlanner/expectations.js: Added. * RexBench/FlightPlanner/flight_planner.js: Added. * RexBench/FlightPlanner/use_unicode.js: Added. * RexBench/FlightPlanner/waypoints.js: Added. * RexBench/Octane2: Added. * RexBench/Octane2/base.js: Added. * RexBench/Octane2/regexp.js: Added. * RexBench/SunSpider: Added. * RexBench/SunSpider/regex-dna.js: Added. * RexBench/about.html: Added. * RexBench/basic_benchmark.js: Added. * RexBench/cli.js: Added. * RexBench/driver.js: Added. * RexBench/flightplan_benchmark.js: Added. * RexBench/flightplan_unicode_benchmark.js: Added. * RexBench/glue.js: Added. * RexBench/index.html: Added. * RexBench/octane2_benchmark.js: Added. * RexBench/results.js: Added. * RexBench/stats.js: Added. * RexBench/styles.css: Added. * RexBench/sunspider_benchmark.js: Added. Canonical link: https://commits.webkit.org/191963@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-05 00:20:23 +00:00
var results = [];
var benchmark = new FlightPlannerBenchmark();
var numIterations = 200;
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: Canonical link: https://commits.webkit.org/192107@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-09 22:33:27 +00:00
benchmark.runIterations(numIterations, results);
Create a new JavaScript RegExp benchmark https://bugs.webkit.org/show_bug.cgi?id=175225 Reviewed by JF Bastien. This is a new benchmark for Regular Expressions. It borrows regex-dna from SunSpider, the regexp test from Octane2, the BASIC parser from ARES-6/Basic, and adds a new flight planner benchmark that uses RegExp's for textual parsing. There needs to be some additions and changes to some of the textual content. This includes adding more BASIC programs to the Basic test and increasing keyword usage in the Flight Planner to increase the 16-bit coverage. The intent is to grow this benchmark by adding a JavaScript implementation of the offline assembler lexer and parser as well as adding some targeted micro benchmark tests. * RexBench: Added. * RexBench/Basic: Added. * RexBench/Basic/ast.js: Added. * RexBench/Basic/basic.js: Added. * RexBench/Basic/benchmark.js: Added. * RexBench/Basic/caseless_map.js: Added. * RexBench/Basic/lexer.js: Added. * RexBench/Basic/number.js: Added. * RexBench/Basic/parser.js: Added. * RexBench/Basic/random.js: Added. * RexBench/Basic/state.js: Added. * RexBench/Basic/stress-test.js: Added. * RexBench/Basic/util.js: Added. * RexBench/FlightPlanner: Added. * RexBench/FlightPlanner/airways.js: Added. * RexBench/FlightPlanner/benchmark.js: Added. * RexBench/FlightPlanner/convert-nfdc.py: Added. * RexBench/FlightPlanner/expectations.js: Added. * RexBench/FlightPlanner/flight_planner.js: Added. * RexBench/FlightPlanner/use_unicode.js: Added. * RexBench/FlightPlanner/waypoints.js: Added. * RexBench/Octane2: Added. * RexBench/Octane2/base.js: Added. * RexBench/Octane2/regexp.js: Added. * RexBench/SunSpider: Added. * RexBench/SunSpider/regex-dna.js: Added. * RexBench/about.html: Added. * RexBench/basic_benchmark.js: Added. * RexBench/cli.js: Added. * RexBench/driver.js: Added. * RexBench/flightplan_benchmark.js: Added. * RexBench/flightplan_unicode_benchmark.js: Added. * RexBench/glue.js: Added. * RexBench/index.html: Added. * RexBench/octane2_benchmark.js: Added. * RexBench/results.js: Added. * RexBench/stats.js: Added. * RexBench/styles.css: Added. * RexBench/sunspider_benchmark.js: Added. Canonical link: https://commits.webkit.org/191963@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-05 00:20:23 +00:00
reportResult(results);
</script>`;
let runFlightPlannerUnicodeBenchmark = null;
if (!isInBrowser) {
let sources = [
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: Canonical link: https://commits.webkit.org/192107@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-09 22:33:27 +00:00
"benchmark.js"
, "FlightPlanner/airways.js"
Create a new JavaScript RegExp benchmark https://bugs.webkit.org/show_bug.cgi?id=175225 Reviewed by JF Bastien. This is a new benchmark for Regular Expressions. It borrows regex-dna from SunSpider, the regexp test from Octane2, the BASIC parser from ARES-6/Basic, and adds a new flight planner benchmark that uses RegExp's for textual parsing. There needs to be some additions and changes to some of the textual content. This includes adding more BASIC programs to the Basic test and increasing keyword usage in the Flight Planner to increase the 16-bit coverage. The intent is to grow this benchmark by adding a JavaScript implementation of the offline assembler lexer and parser as well as adding some targeted micro benchmark tests. * RexBench: Added. * RexBench/Basic: Added. * RexBench/Basic/ast.js: Added. * RexBench/Basic/basic.js: Added. * RexBench/Basic/benchmark.js: Added. * RexBench/Basic/caseless_map.js: Added. * RexBench/Basic/lexer.js: Added. * RexBench/Basic/number.js: Added. * RexBench/Basic/parser.js: Added. * RexBench/Basic/random.js: Added. * RexBench/Basic/state.js: Added. * RexBench/Basic/stress-test.js: Added. * RexBench/Basic/util.js: Added. * RexBench/FlightPlanner: Added. * RexBench/FlightPlanner/airways.js: Added. * RexBench/FlightPlanner/benchmark.js: Added. * RexBench/FlightPlanner/convert-nfdc.py: Added. * RexBench/FlightPlanner/expectations.js: Added. * RexBench/FlightPlanner/flight_planner.js: Added. * RexBench/FlightPlanner/use_unicode.js: Added. * RexBench/FlightPlanner/waypoints.js: Added. * RexBench/Octane2: Added. * RexBench/Octane2/base.js: Added. * RexBench/Octane2/regexp.js: Added. * RexBench/SunSpider: Added. * RexBench/SunSpider/regex-dna.js: Added. * RexBench/about.html: Added. * RexBench/basic_benchmark.js: Added. * RexBench/cli.js: Added. * RexBench/driver.js: Added. * RexBench/flightplan_benchmark.js: Added. * RexBench/flightplan_unicode_benchmark.js: Added. * RexBench/glue.js: Added. * RexBench/index.html: Added. * RexBench/octane2_benchmark.js: Added. * RexBench/results.js: Added. * RexBench/stats.js: Added. * RexBench/styles.css: Added. * RexBench/sunspider_benchmark.js: Added. Canonical link: https://commits.webkit.org/191963@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-05 00:20:23 +00:00
, "FlightPlanner/waypoints.js"
, "FlightPlanner/use_unicode.js"
, "FlightPlanner/flight_planner.js"
, "FlightPlanner/expectations.js"
, "FlightPlanner/benchmark.js"
];
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: Canonical link: https://commits.webkit.org/192107@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-09 22:33:27 +00:00
runFlightPlannerUnicodeBenchmark = makeBenchmarkRunner(sources, "FlightPlannerBenchmark", 200);
Create a new JavaScript RegExp benchmark https://bugs.webkit.org/show_bug.cgi?id=175225 Reviewed by JF Bastien. This is a new benchmark for Regular Expressions. It borrows regex-dna from SunSpider, the regexp test from Octane2, the BASIC parser from ARES-6/Basic, and adds a new flight planner benchmark that uses RegExp's for textual parsing. There needs to be some additions and changes to some of the textual content. This includes adding more BASIC programs to the Basic test and increasing keyword usage in the Flight Planner to increase the 16-bit coverage. The intent is to grow this benchmark by adding a JavaScript implementation of the offline assembler lexer and parser as well as adding some targeted micro benchmark tests. * RexBench: Added. * RexBench/Basic: Added. * RexBench/Basic/ast.js: Added. * RexBench/Basic/basic.js: Added. * RexBench/Basic/benchmark.js: Added. * RexBench/Basic/caseless_map.js: Added. * RexBench/Basic/lexer.js: Added. * RexBench/Basic/number.js: Added. * RexBench/Basic/parser.js: Added. * RexBench/Basic/random.js: Added. * RexBench/Basic/state.js: Added. * RexBench/Basic/stress-test.js: Added. * RexBench/Basic/util.js: Added. * RexBench/FlightPlanner: Added. * RexBench/FlightPlanner/airways.js: Added. * RexBench/FlightPlanner/benchmark.js: Added. * RexBench/FlightPlanner/convert-nfdc.py: Added. * RexBench/FlightPlanner/expectations.js: Added. * RexBench/FlightPlanner/flight_planner.js: Added. * RexBench/FlightPlanner/use_unicode.js: Added. * RexBench/FlightPlanner/waypoints.js: Added. * RexBench/Octane2: Added. * RexBench/Octane2/base.js: Added. * RexBench/Octane2/regexp.js: Added. * RexBench/SunSpider: Added. * RexBench/SunSpider/regex-dna.js: Added. * RexBench/about.html: Added. * RexBench/basic_benchmark.js: Added. * RexBench/cli.js: Added. * RexBench/driver.js: Added. * RexBench/flightplan_benchmark.js: Added. * RexBench/flightplan_unicode_benchmark.js: Added. * RexBench/glue.js: Added. * RexBench/index.html: Added. * RexBench/octane2_benchmark.js: Added. * RexBench/results.js: Added. * RexBench/stats.js: Added. * RexBench/styles.css: Added. * RexBench/sunspider_benchmark.js: Added. Canonical link: https://commits.webkit.org/191963@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-05 00:20:23 +00:00
}
const FlightPlannerUnicodeBenchmarkRunner = {
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: Canonical link: https://commits.webkit.org/192107@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-09 22:33:27 +00:00
name: "Flight Planner - Unicode",
Create a new JavaScript RegExp benchmark https://bugs.webkit.org/show_bug.cgi?id=175225 Reviewed by JF Bastien. This is a new benchmark for Regular Expressions. It borrows regex-dna from SunSpider, the regexp test from Octane2, the BASIC parser from ARES-6/Basic, and adds a new flight planner benchmark that uses RegExp's for textual parsing. There needs to be some additions and changes to some of the textual content. This includes adding more BASIC programs to the Basic test and increasing keyword usage in the Flight Planner to increase the 16-bit coverage. The intent is to grow this benchmark by adding a JavaScript implementation of the offline assembler lexer and parser as well as adding some targeted micro benchmark tests. * RexBench: Added. * RexBench/Basic: Added. * RexBench/Basic/ast.js: Added. * RexBench/Basic/basic.js: Added. * RexBench/Basic/benchmark.js: Added. * RexBench/Basic/caseless_map.js: Added. * RexBench/Basic/lexer.js: Added. * RexBench/Basic/number.js: Added. * RexBench/Basic/parser.js: Added. * RexBench/Basic/random.js: Added. * RexBench/Basic/state.js: Added. * RexBench/Basic/stress-test.js: Added. * RexBench/Basic/util.js: Added. * RexBench/FlightPlanner: Added. * RexBench/FlightPlanner/airways.js: Added. * RexBench/FlightPlanner/benchmark.js: Added. * RexBench/FlightPlanner/convert-nfdc.py: Added. * RexBench/FlightPlanner/expectations.js: Added. * RexBench/FlightPlanner/flight_planner.js: Added. * RexBench/FlightPlanner/use_unicode.js: Added. * RexBench/FlightPlanner/waypoints.js: Added. * RexBench/Octane2: Added. * RexBench/Octane2/base.js: Added. * RexBench/Octane2/regexp.js: Added. * RexBench/SunSpider: Added. * RexBench/SunSpider/regex-dna.js: Added. * RexBench/about.html: Added. * RexBench/basic_benchmark.js: Added. * RexBench/cli.js: Added. * RexBench/driver.js: Added. * RexBench/flightplan_benchmark.js: Added. * RexBench/flightplan_unicode_benchmark.js: Added. * RexBench/glue.js: Added. * RexBench/index.html: Added. * RexBench/octane2_benchmark.js: Added. * RexBench/results.js: Added. * RexBench/stats.js: Added. * RexBench/styles.css: Added. * RexBench/sunspider_benchmark.js: Added. Canonical link: https://commits.webkit.org/191963@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-08-05 00:20:23 +00:00
code: FlightPlannerUnicodeBenchmarkCode,
run: runFlightPlannerUnicodeBenchmark,
cells: {}
};
if (isInBrowser) {
FlightPlannerUnicodeBenchmarkRunner.cells = {
firstIteration: document.getElementById("FlightPlannerUnicodeFirstIteration"),
averageWorstCase: document.getElementById("FlightPlannerUnicodeAverageWorstCase"),
steadyState: document.getElementById("FlightPlannerUnicodeSteadyState"),
message: document.getElementById("FlightPlannerUnicodeMessage")
};
}