2015-10-13 03:29:13 -04:00
|
|
|
import {runClickBenchmark, verifyNoBrowserErrors} from 'angular2/src/testing/perf_util';
|
2015-05-30 00:40:15 -04:00
|
|
|
|
|
|
|
describe('ng2 tree benchmark', function() {
|
|
|
|
|
|
|
|
var URL = 'benchmarks/src/tree/tree_benchmark.html';
|
|
|
|
|
2015-05-30 11:17:27 -04:00
|
|
|
afterEach(verifyNoBrowserErrors);
|
2015-05-30 00:40:15 -04:00
|
|
|
|
2015-12-02 13:35:51 -05:00
|
|
|
it('should log the ng stats', function(done) {
|
2015-05-30 11:17:27 -04:00
|
|
|
runClickBenchmark({
|
|
|
|
url: URL,
|
|
|
|
buttons: ['#ng2DestroyDom', '#ng2CreateDom'],
|
|
|
|
id: 'ng2.tree.create.plain',
|
2015-12-02 13:35:51 -05:00
|
|
|
params: [{name: 'depth', value: 9, scale: 'log2'}]
|
2015-05-30 11:17:27 -04:00
|
|
|
}).then(done, done.fail);
|
2015-05-30 00:40:15 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should log the ng stats (update)', function(done) {
|
2015-05-30 11:17:27 -04:00
|
|
|
runClickBenchmark({
|
|
|
|
url: URL,
|
|
|
|
buttons: ['#ng2CreateDom'],
|
|
|
|
id: 'ng2.tree.update',
|
2015-12-02 13:35:51 -05:00
|
|
|
params: [{name: 'depth', value: 9, scale: 'log2'}]
|
2015-05-30 11:17:27 -04:00
|
|
|
}).then(done, done.fail);
|
2015-05-30 00:40:15 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should log the baseline stats', function(done) {
|
2015-05-30 11:17:27 -04:00
|
|
|
runClickBenchmark({
|
|
|
|
url: URL,
|
|
|
|
buttons: ['#baselineDestroyDom', '#baselineCreateDom'],
|
|
|
|
id: 'baseline.tree.create',
|
|
|
|
params: [{name: 'depth', value: 9, scale: 'log2'}]
|
|
|
|
}).then(done, done.fail);
|
2015-05-30 00:40:15 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should log the baseline stats (update)', function(done) {
|
2015-05-30 11:17:27 -04:00
|
|
|
runClickBenchmark({
|
|
|
|
url: URL,
|
|
|
|
buttons: ['#baselineCreateDom'],
|
|
|
|
id: 'baseline.tree.update',
|
|
|
|
params: [{name: 'depth', value: 9, scale: 'log2'}]
|
|
|
|
}).then(done, done.fail);
|
2015-05-30 00:40:15 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|