Update benchmark paths

master
Futago-za Ryuu 6 years ago
parent 53b966289b
commit 0253215c24

@ -9,7 +9,7 @@
"scripts": {
"lint": "eslint --ext .js,.vue . docs/.vuepress",
"test": "nyc mocha --recursive",
"benchmark": "node tools/benchmark/node",
"benchmark": "node tools/benchmark",
"build-docs": "vuepress build docs",
"watch-docs": "vuepress dev docs",
"build-parser": "pegjs -c src/pegjs.config.js",

@ -3,5 +3,5 @@ This directory contains the benchmark suite that measures the speed of parsers g
From the root of the repository:
```sh
node tools/benchmark/node
node tools/benchmark
```

@ -78,8 +78,6 @@ $( "#run" ).click( () => {
readFile( file ) {
if ( file.indexOf( "benchmark" ) === 0 ) file = "tools/" + file;
return $.ajax( {
type: "GET",
url: `https://raw.githubusercontent.com/pegjs/pegjs/${ BRANCH }/` + file,
@ -98,7 +96,8 @@ $( "#run" ).click( () => {
appendResult(
"individual",
test.title,
"benchmark/" + benchmark.id + "/" + test.file,
"tools/benchmark/" + benchmark.id + "/" + test.file,
`https://raw.githubusercontent.com/pegjs/pegjs/${ BRANCH }/tools/benchmark/${ benchmark.id }/${ test.file }`,
inputSize,
parseTime
);

@ -207,8 +207,6 @@ Runner.run( benchmarks, runCount, options, {
readFile( file ) {
if ( file.startsWith( "benchmark" ) ) file = path.join( "tools", file );
return fs.readFileSync( file, "utf8" );
},

@ -85,7 +85,7 @@ const Runner = {
callbacks.testStart( benchmark, test );
const input = callbacks.readFile( "benchmark/" + benchmark.id + "/" + test.file );
const input = callbacks.readFile( "tools/benchmark/" + benchmark.id + "/" + test.file );
let parseTime = 0;
for ( let i = 0; i < runCount; i++ ) {

Loading…
Cancel
Save