Merge pull request #94 from mozilla/benchmark-folder

Fixed broken benchmark reporter code, moved benchmark code to its own folder
This commit is contained in:
Gijs 2015-04-02 14:51:10 +01:00
commit 7430df7f23
4 changed files with 15 additions and 8 deletions

View File

@ -54,6 +54,16 @@ Combo time:
$ mocha test/test-*.js -w -g 001 $ mocha test/test-*.js -w -g 001
## Benchmarks
Benchmarks for all test pages:
$ npm run perf
Reference benchmark:
$ npm run perf-reference
## License ## License
Copyright (c) 2010 Arc90 Inc Copyright (c) 2010 Arc90 Inc

View File

@ -1,7 +1,4 @@
var matchaPath = require.resolve('matcha'); var clean = require('matcha/lib/matcha/reporters/clean');
var path = require('path');
var clean = require('matcha/lib/matcha/reporters/clean'));
function average(list) { function average(list) {
if (!list.length) if (!list.length)

View File

@ -1,6 +1,6 @@
var getTestPages = require("./test/bootstrap").getTestPages; var getTestPages = require("../test/bootstrap").getTestPages;
var readability = require("./index.js"); var readability = require("../index.js");
var Readability = readability.Readability; var Readability = readability.Readability;
var JSDOMParser = readability.JSDOMParser; var JSDOMParser = readability.JSDOMParser;

View File

@ -6,8 +6,8 @@
"scripts": { "scripts": {
"test": "mocha test/test-*.js", "test": "mocha test/test-*.js",
"generate-testcase": "node test/generate-testcase.js", "generate-testcase": "node test/generate-testcase.js",
"perf": "matcha benchmarks.js", "perf": "matcha benchmarks/benchmarks.js",
"perf-reference": "READABILITY_PERF_REFERENCE=1 matcha --reporter ./benchmark-reporter.js benchmarks.js" "perf-reference": "READABILITY_PERF_REFERENCE=1 matcha --reporter ./benchmarks/benchmark-reporter.js benchmarks/benchmarks.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",