refactor(perf): introduce benchpress2

Major changes:
- make API more reusable
- format output nicely
- only force gc if needed

Regarding forcing gc:
Forcing gc can change script execution time.
We now don't force gc at first and ignore results where gc happens during script execution.
When we ignored too many results, we switch to forcing gc.

Closes #339
This commit is contained in:
Tobias Bosch
2014-12-29 15:36:29 -08:00
parent 53906e484a
commit 6f303121c6
16 changed files with 572 additions and 285 deletions

View File

@ -3,13 +3,13 @@ var config = exports.config = {
specs: ['modules/*/test/**/*_perf.js'],
params: {
// size of the sample to take
sampleSize: 10,
// error to be used for early exit
exitOnErrorLowerThan: 4,
// maxium number times the benchmark gets repeated before we output the stats
// of the best sample
maxRepeatCount: 30
timeBenchmark: {
// size of the sample to take
sampleSize: 10,
targetCoefficientOfVariation: 4,
timeout: 20000,
metrics: ['script', 'render']
}
},
// Disable waiting for Angular as we don't have an integration layer yet...
@ -54,4 +54,4 @@ if (process.env.TRAVIS) {
performance: 'ALL'
}
};
}
}