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 selector benchmark', function() {
|
|
|
|
|
|
|
|
var URL = 'benchmarks/src/compiler/selector_benchmark.html';
|
|
|
|
|
2015-05-30 11:17:27 -04:00
|
|
|
afterEach(verifyNoBrowserErrors);
|
2015-05-30 00:40:15 -04:00
|
|
|
|
|
|
|
it('should log parse stats', function(done) {
|
2015-05-30 11:17:27 -04:00
|
|
|
runClickBenchmark({
|
|
|
|
url: URL,
|
|
|
|
buttons: ['#parse'],
|
|
|
|
id: 'ng2.selector.parse',
|
2015-08-27 11:44:59 -04:00
|
|
|
params: [{name: 'selectors', value: 10000, scale: 'linear'}],
|
|
|
|
waitForAngular2: false
|
2015-05-30 11:17:27 -04:00
|
|
|
}).then(done, done.fail);
|
2015-05-30 00:40:15 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should log addSelectable stats', function(done) {
|
2015-05-30 11:17:27 -04:00
|
|
|
runClickBenchmark({
|
|
|
|
url: URL,
|
|
|
|
buttons: ['#addSelectable'],
|
|
|
|
id: 'ng2.selector.addSelectable',
|
2015-08-27 11:44:59 -04:00
|
|
|
params: [{name: 'selectors', value: 10000, scale: 'linear'}],
|
|
|
|
waitForAngular2: false
|
2015-05-30 11:17:27 -04:00
|
|
|
}).then(done, done.fail);
|
2015-05-30 00:40:15 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should log match stats', function(done) {
|
2015-05-30 11:17:27 -04:00
|
|
|
runClickBenchmark({
|
|
|
|
url: URL,
|
|
|
|
buttons: ['#match'],
|
|
|
|
id: 'ng2.selector.match',
|
2015-08-27 11:44:59 -04:00
|
|
|
params: [{name: 'selectors', value: 10000, scale: 'linear'}],
|
|
|
|
waitForAngular2: false
|
2015-05-30 11:17:27 -04:00
|
|
|
}).then(done, done.fail);
|
2015-05-30 00:40:15 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|