refactor(perf): use webdriver to execute benchmarks
- use performance log of chromedriver / appium to get timeline data for calculating metrics for benchmarks - change all benchmarks to be made of a standalone application and a protractor test that collectes timeline data - fix and simplify benchmarks - add dart2js to build - remove benchpress Closes #330
This commit is contained in:
50
protractor-perf-shared.js
Normal file
50
protractor-perf-shared.js
Normal file
@ -0,0 +1,50 @@
|
||||
var config = exports.config = {
|
||||
|
||||
specs: ['modules/*/test/**/*_perf.js'],
|
||||
|
||||
params: {
|
||||
// number test iterations to warm up the browser
|
||||
warmupCount: 10,
|
||||
// number test iterations to measure
|
||||
measureCount: 10,
|
||||
// TODO(tbosch): remove this and provide a proper protractor integration
|
||||
sleepInterval: process.env.TRAVIS ? 5000 : 1000,
|
||||
},
|
||||
|
||||
// Disable waiting for Angular as we don't have an integration layer yet...
|
||||
// TODO(tbosch): Implement a proper debugging API for Ng2.0, remove this here
|
||||
// and the sleeps in all tests.
|
||||
onPrepare: function() {
|
||||
browser.ignoreSynchronization = true;
|
||||
},
|
||||
|
||||
jasmineNodeOpts: {
|
||||
showColors: true,
|
||||
defaultTimeoutInterval: 30000
|
||||
}
|
||||
};
|
||||
|
||||
// TODO: add real mobile devices via a cloud provider that supports appium
|
||||
if (process.env.TRAVIS) {
|
||||
config.capabilities = {
|
||||
name: 'Dartium',
|
||||
browserName: 'chrome',
|
||||
chromeOptions: {
|
||||
'binary': process.env.DARTIUM,
|
||||
'args': ['--js-flags=--expose-gc']
|
||||
},
|
||||
loggingPrefs: {
|
||||
performance: 'ALL'
|
||||
}
|
||||
};
|
||||
} else {
|
||||
config.capabilities = {
|
||||
browserName: 'chrome',
|
||||
chromeOptions: {
|
||||
'args': ['--js-flags=--expose-gc']
|
||||
},
|
||||
loggingPrefs: {
|
||||
performance: 'ALL'
|
||||
}
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user