feat(bench press): use chrome tracing protocol and initial iOS support

This commit is contained in:
Tobias Bosch
2015-02-18 14:39:52 -08:00
parent 8a3d9050d9
commit 7aa031b3d3
14 changed files with 733 additions and 332 deletions

View File

@ -35,7 +35,10 @@ var BROWSER_CAPS = {
browserName: 'chrome',
chromeOptions: {
'binary': process.env.DARTIUM,
'args': ['--js-flags=--expose-gc']
'args': ['--js-flags=--expose-gc'],
'perfLoggingPrefs': {
'traceCategories': 'blink.console,disabled-by-default-devtools.timeline'
}
},
loggingPrefs: {
performance: 'ALL',
@ -45,7 +48,10 @@ var BROWSER_CAPS = {
ChromeDesktop: {
browserName: 'chrome',
chromeOptions: {
'args': ['--js-flags=--expose-gc']
'args': ['--js-flags=--expose-gc'],
'perfLoggingPrefs': {
'traceCategories': 'blink.console,disabled-by-default-devtools.timeline'
}
},
loggingPrefs: {
performance: 'ALL',
@ -56,12 +62,36 @@ var BROWSER_CAPS = {
browserName: 'chrome',
chromeOptions: {
androidPackage: 'com.android.chrome',
'args': ['--js-flags=--expose-gc']
'args': ['--js-flags=--expose-gc'],
'perfLoggingPrefs': {
'traceCategories': 'blink.console,disabled-by-default-devtools.timeline'
}
},
loggingPrefs: {
performance: 'ALL',
browser: 'ALL'
}
},
IPhoneSimulator: {
browserName: 'MobileSafari',
simulator: true,
CFBundleName: 'Safari',
device: 'iphone',
instruments: 'true',
loggingPrefs: {
performance: 'ALL',
browser: 'ALL'
}
},
IPadNative: {
browserName: 'MobileSafari',
simulator: false,
CFBundleName: 'Safari',
device: 'ipad',
loggingPrefs: {
performance: 'ALL',
browser: 'ALL'
}
}
};
@ -145,7 +175,13 @@ exports.createBenchpressRunner = function(options) {
benchpress.bind(benchpress.Options.DEFAULT_DESCRIPTION).toValue({
'lang': options.lang,
'runId': runId
})
}),
// TODO(tbosch): Make the ChromeDriverExtension configurable based on the
// capabilities. Should support the case where we test against
// ios and chrome at the same time!
benchpress.bind(benchpress.WebDriverExtension).toFactory(function(adapter) {
return new benchpress.ChromeDriverExtension(adapter);
}, [benchpress.WebDriverAdapter])
];
if (argv['benchmark']) {
bindings.push(benchpress.RegressionSlopeValidator.BINDINGS);