fix(benchmarks): wait for end of benchmarks

This commit is contained in:
Tobias Bosch 2015-04-21 10:11:59 -07:00
parent 14a7b9f794
commit 97e6fb6835
2 changed files with 5 additions and 5 deletions

View File

@ -33,7 +33,7 @@ function runBenchmark(config) {
} }
var url = encodeURI(config.url + '?' + urlParams.join('&')); var url = encodeURI(config.url + '?' + urlParams.join('&'));
return browser.get(url).then(function() { return browser.get(url).then(function() {
benchpressRunner.sample({ return benchpressRunner.sample({
id: config.id, id: config.id,
execute: config.work, execute: config.work,
prepare: config.prepare, prepare: config.prepare,

View File

@ -18,7 +18,7 @@ describe('ng2 largetable benchmark', function () {
'interpolationAttr', 'interpolationAttr',
'interpolationFn' 'interpolationFn'
].forEach(function(benchmarkType) { ].forEach(function(benchmarkType) {
it('should log the ng stats with: ' + benchmarkType, function() { it('should log the ng stats with: ' + benchmarkType, function(done) {
console.log('executing for type', benchmarkType); console.log('executing for type', benchmarkType);
perfUtil.runClickBenchmark({ perfUtil.runClickBenchmark({
url: URL, url: URL,
@ -36,12 +36,12 @@ describe('ng2 largetable benchmark', function () {
name: 'benchmarkType', name: 'benchmarkType',
value: benchmarkType value: benchmarkType
}] }]
}); }).then(done, done.fail);
}); });
}); });
it('should log the baseline stats', function() { it('should log the baseline stats', function(done) {
perfUtil.runClickBenchmark({ perfUtil.runClickBenchmark({
url: URL, url: URL,
buttons: ['#baselineDestroyDom', '#baselineCreateDom'], buttons: ['#baselineDestroyDom', '#baselineCreateDom'],
@ -58,7 +58,7 @@ describe('ng2 largetable benchmark', function () {
name: 'benchmarkType', name: 'benchmarkType',
value: 'baseline' value: 'baseline'
}] }]
}); }).then(done, done.fail);;
}); });
}); });