1
- var perfUtil = require ( 'angular2/src/test_lib/perf_util' ) ;
1
+ import { runBenchmark , verifyNoBrowserErrors } from 'angular2/src/test_lib/perf_util' ;
2
2
3
- describe ( 'ng-dart1.x naive infinite scroll benchmark' , function ( ) {
3
+ describe ( 'ng-dart1.x naive infinite scroll benchmark' , function ( ) {
4
4
5
5
var URL = 'benchmarks_external/src/naive_infinite_scroll/index.html' ;
6
6
7
- afterEach ( perfUtil . verifyNoBrowserErrors ) ;
7
+ afterEach ( verifyNoBrowserErrors ) ;
8
8
9
9
[ 1 , 2 , 4 ] . forEach ( function ( appSize ) {
10
- it ( 'should run scroll benchmark and collect stats for appSize = ' +
11
- appSize , function ( done ) {
12
- perfUtil . runBenchmark ( {
10
+ it ( 'should run scroll benchmark and collect stats for appSize = ' + appSize , function ( done ) {
11
+ runBenchmark ( {
13
12
url : URL ,
14
13
id : 'ng1-dart1.x.naive_infinite_scroll' ,
15
14
work : function ( ) {
@@ -21,13 +20,11 @@ describe('ng-dart1.x naive infinite scroll benchmark', function () {
21
20
}
22
21
browser . sleep ( s ) ;
23
22
} ,
24
- params : [ {
25
- name : 'appSize' , value : appSize
26
- } , {
27
- name : 'iterationCount' , value : 20 , scale : 'linear'
28
- } , {
29
- name : 'scrollIncrement' , value : 40
30
- } ]
23
+ params : [
24
+ { name : 'appSize' , value : appSize } ,
25
+ { name : 'iterationCount' , value : 20 , scale : 'linear' } ,
26
+ { name : 'scrollIncrement' , value : 40 }
27
+ ]
31
28
} ) . then ( done , done . fail ) ;
32
29
} ) ;
33
30
} ) ;
0 commit comments