File tree 2 files changed +8
-7
lines changed
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 3
3
// toggle them one by one
4
4
// then delete them one by one
5
5
6
- // do not run when testing in PhantomJS
7
- if ( window . location . search === '?benchmark=1' ) {
8
- runBenchmark ( )
9
- }
6
+ ( function ( ) {
10
7
11
- function runBenchmark ( ) {
8
+ var benchSetting = window . location . search . match ( / \b b e n c h m a r k = ( \d + ) / )
9
+ if ( ! benchSetting ) return
12
10
13
- var itemsToAdd = 200 ,
11
+ var itemsToAdd = + benchSetting [ 1 ] ,
14
12
now = window . performance && window . performance . now
15
13
? function ( ) { return window . performance . now ( ) ; }
16
14
: Date . now ,
@@ -74,4 +72,4 @@ function runBenchmark () {
74
72
}
75
73
} , 0 )
76
74
77
- }
75
+ } ) ( )
Original file line number Diff line number Diff line change @@ -187,6 +187,9 @@ var utils = module.exports = {
187
187
warn : function ( ) {
188
188
if ( ! config . silent && console ) {
189
189
console . warn ( join . call ( arguments , ' ' ) )
190
+ if ( config . debug ) {
191
+ console . trace ( )
192
+ }
190
193
}
191
194
} ,
192
195
You can’t perform that action at this time.
0 commit comments