2016-08-26 15:27:24 -04:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
2015-05-30 00:40:15 -04:00
|
|
|
|
2016-08-30 12:29:39 -04:00
|
|
|
import {runBenchmark, verifyNoBrowserErrors} from 'e2e_util/perf_util';
|
2015-05-30 00:40:15 -04:00
|
|
|
|
2016-08-30 17:17:37 -04:00
|
|
|
describe('tree benchmark perf', () => {
|
2015-05-30 00:40:15 -04:00
|
|
|
|
2016-08-26 15:27:24 -04:00
|
|
|
afterEach(verifyNoBrowserErrors);
|
2015-05-30 00:40:15 -04:00
|
|
|
|
2016-08-30 17:17:37 -04:00
|
|
|
it('should run for ng2', (done) => {
|
|
|
|
runTreeBenchmark({
|
|
|
|
id: 'deepTree.ng2',
|
|
|
|
url: 'all/benchmarks/src/tree/ng2/index.html',
|
2016-08-30 12:29:39 -04:00
|
|
|
}).then(done, done.fail);
|
2015-05-30 00:40:15 -04:00
|
|
|
});
|
|
|
|
|
2016-09-01 13:29:35 -04:00
|
|
|
it('should run for ng2 static', (done) => {
|
|
|
|
runTreeBenchmark({
|
|
|
|
id: 'deepTree.ng2.static',
|
|
|
|
url: 'all/benchmarks/src/tree/ng2_static/index.html',
|
|
|
|
}).then(done, done.fail);
|
|
|
|
});
|
|
|
|
|
2016-08-30 17:17:37 -04:00
|
|
|
it('should run for the baseline', (done) => {
|
|
|
|
runTreeBenchmark({
|
|
|
|
id: 'deepTree.baseline',
|
|
|
|
url: 'all/benchmarks/src/tree/baseline/index.html',
|
|
|
|
ignoreBrowserSynchronization: true,
|
2016-08-30 16:44:52 -04:00
|
|
|
}).then(done, done.fail);
|
2015-05-30 00:40:15 -04:00
|
|
|
});
|
|
|
|
|
2016-09-01 13:31:11 -04:00
|
|
|
it('should run for the baseline dom', (done) => {
|
|
|
|
runTreeBenchmark({
|
|
|
|
id: 'deepTree.baselineDom',
|
|
|
|
url: 'all/benchmarks/src/tree/baseline_dom/index.html',
|
|
|
|
ignoreBrowserSynchronization: true,
|
|
|
|
}).then(done, done.fail);
|
|
|
|
});
|
2016-09-01 13:31:31 -04:00
|
|
|
|
|
|
|
it('should run for the incremental dom', (done) => {
|
|
|
|
runTreeBenchmark({
|
|
|
|
id: 'deepTree.incrementalDom',
|
|
|
|
url: 'all/benchmarks/src/tree/incremental_dom/index.html',
|
|
|
|
ignoreBrowserSynchronization: true,
|
|
|
|
}).then(done, done.fail);
|
|
|
|
});
|
|
|
|
|
2016-08-30 17:17:37 -04:00
|
|
|
it('should run for polymer binary tree', (done) => {
|
|
|
|
runTreeBenchmark({
|
2016-08-30 12:29:39 -04:00
|
|
|
id: 'deepTree.polymer',
|
|
|
|
url: 'all/benchmarks/src/tree/polymer/index.html',
|
|
|
|
ignoreBrowserSynchronization: true,
|
2016-08-30 16:44:52 -04:00
|
|
|
}).then(done, done.fail);
|
|
|
|
});
|
|
|
|
|
2016-08-30 17:17:37 -04:00
|
|
|
it('should run for polymer leaves', (done) => {
|
|
|
|
runTreeBenchmark({
|
2016-08-30 16:44:52 -04:00
|
|
|
id: 'deepTree.polymerLeaves',
|
|
|
|
url: 'all/benchmarks/src/tree/polymer_leaves/index.html',
|
|
|
|
ignoreBrowserSynchronization: true,
|
2016-08-30 17:17:37 -04:00
|
|
|
}).then(done, done.fail);
|
|
|
|
});
|
|
|
|
|
|
|
|
function runTreeBenchmark(
|
|
|
|
config: {id: string, url: string, ignoreBrowserSynchronization?: boolean}) {
|
|
|
|
return runBenchmark({
|
|
|
|
id: config.id,
|
|
|
|
url: config.url,
|
|
|
|
ignoreBrowserSynchronization: config.ignoreBrowserSynchronization,
|
2016-08-30 16:44:52 -04:00
|
|
|
params: [{name: 'depth', value: 9}],
|
|
|
|
work: () => {
|
|
|
|
$('#createDom').click();
|
|
|
|
$('#destroyDom').click();
|
|
|
|
}
|
2016-08-30 17:17:37 -04:00
|
|
|
});
|
|
|
|
}
|
2015-05-30 00:40:15 -04:00
|
|
|
});
|