2015-10-13 03:29:13 -04:00
|
|
|
import {runBenchmark, verifyNoBrowserErrors} from 'angular2/src/testing/perf_util';
|
2015-01-27 12:53:22 -05:00
|
|
|
|
2015-06-03 13:04:27 -04:00
|
|
|
describe('ng-dart1.x naive infinite scroll benchmark', function() {
|
2015-01-27 12:53:22 -05:00
|
|
|
|
2015-02-02 19:25:34 -05:00
|
|
|
var URL = 'benchmarks_external/src/naive_infinite_scroll/index.html';
|
2015-01-27 12:53:22 -05:00
|
|
|
|
2015-06-03 13:04:27 -04:00
|
|
|
afterEach(verifyNoBrowserErrors);
|
2015-01-27 12:53:22 -05:00
|
|
|
|
|
|
|
[1, 2, 4].forEach(function(appSize) {
|
2015-06-03 13:04:27 -04:00
|
|
|
it('should run scroll benchmark and collect stats for appSize = ' + appSize, function(done) {
|
|
|
|
runBenchmark({
|
2015-01-27 12:53:22 -05:00
|
|
|
url: URL,
|
|
|
|
id: 'ng1-dart1.x.naive_infinite_scroll',
|
|
|
|
work: function() {
|
2015-02-27 12:07:16 -05:00
|
|
|
$('#reset-btn').click();
|
|
|
|
$('#run-btn').click();
|
2015-02-05 21:33:57 -05:00
|
|
|
var s = 1000;
|
|
|
|
if (appSize > 4) {
|
|
|
|
s = s + appSize * 100;
|
|
|
|
}
|
|
|
|
browser.sleep(s);
|
2015-01-27 12:53:22 -05:00
|
|
|
},
|
2015-06-03 13:04:27 -04:00
|
|
|
params: [
|
2016-04-12 12:40:37 -04:00
|
|
|
{name: 'appSize', value: appSize},
|
|
|
|
{name: 'iterationCount', value: 20, scale: 'linear'},
|
2015-06-03 13:04:27 -04:00
|
|
|
{name: 'scrollIncrement', value: 40}
|
2015-08-27 11:44:59 -04:00
|
|
|
],
|
|
|
|
waitForAngular2: false
|
2015-02-11 13:13:49 -05:00
|
|
|
}).then(done, done.fail);
|
2015-01-27 12:53:22 -05:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|