2015-01-06 18:19:22 -05:00
|
|
|
// load traceur runtime as our tests are written in es6
|
|
|
|
require('traceur/bin/traceur-runtime.js');
|
|
|
|
|
2015-01-09 21:00:04 -05:00
|
|
|
var cloudReporterConfig;
|
|
|
|
try {
|
|
|
|
cloudReporterConfig = require('./perf-cloud-secret.js');
|
|
|
|
} catch (e) {
|
|
|
|
cloudReporterConfig = null;
|
|
|
|
}
|
|
|
|
|
2014-12-22 20:50:10 -05:00
|
|
|
var config = exports.config = {
|
|
|
|
|
2015-01-06 18:19:22 -05:00
|
|
|
specs: ['dist/cjs/**/*_perf.js'],
|
2014-12-22 20:50:10 -05:00
|
|
|
|
|
|
|
params: {
|
2015-01-07 14:31:18 -05:00
|
|
|
benchmark: {
|
2014-12-29 18:36:29 -05:00
|
|
|
// size of the sample to take
|
2015-01-09 21:00:04 -05:00
|
|
|
sampleSize: 20,
|
2014-12-29 18:36:29 -05:00
|
|
|
timeout: 20000,
|
2015-01-07 17:35:42 -05:00
|
|
|
metrics: ['script', 'render', 'gcAmount', 'gcAmountInScript', 'gcTime'],
|
2015-01-09 21:00:04 -05:00
|
|
|
// forces a gc after every run
|
|
|
|
forceGc: false,
|
|
|
|
reporters: [
|
|
|
|
require('./dist/cjs/tools/benchpress/src/console_reporter.js'),
|
|
|
|
cloudReporterConfig ? require('./dist/cjs/tools/benchpress/src/cloud_reporter.js') : null,
|
|
|
|
],
|
|
|
|
cloudReporter: cloudReporterConfig
|
2014-12-29 18:36:29 -05:00
|
|
|
}
|
2014-12-22 20:50:10 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
// 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;
|
2014-12-29 17:20:48 -05:00
|
|
|
var _get = browser.get;
|
2015-01-08 13:02:23 -05:00
|
|
|
var sleepInterval = process.env.TRAVIS ? 5000 : 2000;
|
2014-12-29 17:20:48 -05:00
|
|
|
browser.get = function() {
|
2015-01-08 13:02:23 -05:00
|
|
|
var result = _get.apply(this, arguments);
|
2014-12-29 17:20:48 -05:00
|
|
|
browser.sleep(sleepInterval);
|
2015-01-08 13:02:23 -05:00
|
|
|
return result;
|
2014-12-29 17:20:48 -05:00
|
|
|
}
|
2014-12-22 20:50:10 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
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'
|
|
|
|
}
|
|
|
|
};
|
2014-12-29 18:36:29 -05:00
|
|
|
}
|