959f20f6e2
This will allow to use ES2015 constructs in benchmark code. The change required introducing a small server, which serves both PEG.js and benchmark code passed through Babel and bundled together. This allowed to convert the benchmark to regular modules and to get rid of the hackery that was previously needed to make it run both in Node.js and in the browser. Note the benchmark no longer exercises the browser version. See #442.
41 lines
1.1 KiB
HTML
41 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>PEG.js Benchmark Suite</title>
|
|
<link rel="stylesheet" href="index.css">
|
|
</head>
|
|
<body>
|
|
<h1>PEG.js Benchmark Suite</h1>
|
|
|
|
<div id="options">
|
|
<label for="run-count">Run each test</label>
|
|
<input type="text" id="run-count" value="10"> times
|
|
<input type="checkbox" id="cache">
|
|
<label for="cache">Use results cache</label>
|
|
<label for="optimize">Optimize:</label>
|
|
<select id="optimize">
|
|
<option value="speed">Speed</option>
|
|
<option value="size">Size</option>
|
|
</select>
|
|
<input type="button" id="run" value="Run">
|
|
</div>
|
|
|
|
<table id="results-table">
|
|
<tr class="columns">
|
|
<th>Test</th>
|
|
<th>Input Size</th>
|
|
<th>Average Parse Time</th>
|
|
<th>Average Parse Speed</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="no-results" colspan="4">No results available yet.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<script src="vendor/jquery/jquery.js"></script>
|
|
<script src="vendor/jquery.scrollto/jquery.scrollTo.js"></script>
|
|
<script src="bundle.js"></script>
|
|
</body>
|
|
</html>
|