@@ -154,32 +154,29 @@ interface Timingresult {
154
154
// The PID for the click event. We're dropping all events from other processes.
155
155
let pid = click . pid ;
156
156
let eventsDuringBenchmark = R . filter ( ( e : Timingresult ) => ( e . ts > click . end || e . type === 'click' ) ) ( events ) ;
157
+ if ( config . LOG_DETAILS ) logEvents ( eventsDuringBenchmark , click ) ;
157
158
158
159
let droppedNonMainProcessCommitEvents = false ;
159
160
let droppedNonMainProcessOtherEvents = false ;
160
161
let eventsOnMainThreadDuringBenchmark = R . filter ( ( e : Timingresult ) => e . pid === pid ) ( eventsDuringBenchmark ) ;
161
162
if ( eventsOnMainThreadDuringBenchmark . length !== eventsDuringBenchmark . length ) {
162
163
let droppedEvents = R . filter ( ( e : Timingresult ) => e . pid !== pid ) ( events ) ;
163
- console . log ( "droppedEvents:" )
164
- logEvents ( droppedEvents , click ) ;
165
164
if ( R . any ( ( e : Timingresult ) => e . type === 'commit' ) ( droppedEvents ) ) {
166
165
console . log ( "INFO: Dropping commit events from other processes" , fileName ) ;
166
+ logEvents ( droppedEvents , click ) ;
167
167
droppedNonMainProcessCommitEvents = true
168
168
}
169
169
if ( R . any ( ( e : Timingresult ) => e . type !== 'commit' ) ( droppedEvents ) ) {
170
170
console . log ( "INFO: Dropping non-commit events from other processes" , fileName ) ;
171
+ logEvents ( droppedEvents , click ) ;
171
172
droppedNonMainProcessOtherEvents = true ;
172
173
}
173
174
}
174
175
175
176
let startFrom = ( R . filter ( type_eq ( 'click' , 'fireAnimationFrame' , 'timerFire' , 'layout' , 'functioncall' ) ) ( eventsOnMainThreadDuringBenchmark ) ) ;
176
177
// we're looking for the commit after this event
177
178
let startFromEvent = startFrom [ startFrom . length - 1 ] ;
178
- console . log ( "DEBUG: searching for commit event after" , startFromEvent , "for" , fileName ) ;
179
- if ( startFromEvent . type == 'functioncall' ) {
180
- console . log ( "INFO: Commit event is searched after a functioncall event " , fileName ) ;
181
- logEvents ( eventsOnMainThreadDuringBenchmark , click ) ;
182
- }
179
+ if ( config . LOG_DETAILS ) console . log ( "DEBUG: searching for commit event after" , startFromEvent , "for" , fileName ) ;
183
180
let commit = R . find ( ( e : Timingresult ) => e . ts > startFromEvent . end ) ( R . filter ( type_eq ( 'commit' ) ) ( eventsOnMainThreadDuringBenchmark ) ) ;
184
181
let allCommitsAfterClick = ( R . filter ( type_eq ( 'commit' ) ) ( eventsOnMainThreadDuringBenchmark ) ) ;
185
182
@@ -277,21 +274,27 @@ interface Timingresult {
277
274
278
275
print ( ) {
279
276
console . log ( "\n==== Results of PlausibilityCheck:" ) ;
280
- console . log ( "Info: The following implementation had a unnecessary layout event for select row:" ) ;
281
- for ( let [ impl , maxDelay ] of this . maxDeltaBetweenCommits . entries ( ) ) {
282
- if ( maxDelay > 0 ) console . log ( ` ${ impl } : ${ maxDelay } ` ) ;
277
+ if ( this . maxDeltaBetweenCommits . size > 0 ) {
278
+ console . log ( "Info: The following implementation had a unnecessary layout event for select row:" ) ;
279
+ for ( let [ impl , maxDelay ] of this . maxDeltaBetweenCommits . entries ( ) ) {
280
+ if ( maxDelay > 0 ) console . log ( ` ${ impl } : ${ maxDelay } ` ) ;
281
+ }
282
+ console . log ( " Interpretation: Just an information. Could be optimized, but not a bug in the implementation." ) ;
283
283
}
284
- console . log ( " Interpretation: Just an information. Could be optimized, but not a bug in the implementation." ) ;
285
- console . log ( "Info: Some frameworks have a delay between raf and fire animation frame longer than 16 msecs. The correction was:" ) ;
286
- for ( let [ impl , maxDelay ] of this . raf_long_delays . entries ( ) ) {
287
- if ( maxDelay > 0 ) console . log ( ` ${ impl } : ${ maxDelay } ` ) ;
284
+ if ( this . raf_long_delays . size > 0 ) {
285
+ console . log ( "Info: Some frameworks have a delay between raf and fire animation frame longer than 16 msecs. The correction was:" ) ;
286
+ for ( let [ impl , maxDelay ] of this . raf_long_delays . entries ( ) ) {
287
+ if ( maxDelay > 0 ) console . log ( ` ${ impl } : ${ maxDelay } ` ) ;
288
+ }
289
+ console . log ( " Interpretation: If the list contains more than just a few entries or large numbers the results should be checked" ) ;
288
290
}
289
- console . log ( " Interpretation: If the list contains more than just a few entries or large numbers the results should be checked" ) ;
290
- console . log ( "Warning: Implemenations with multiple commit events:" ) ;
291
- for ( let [ impl , maxDelay ] of this . maxDeltaBetweenCommits . entries ( ) ) {
292
- if ( maxDelay > 0 ) console . log ( ` ${ impl } : ${ maxDelay } ` ) ;
291
+ if ( this . maxDeltaBetweenCommits . size > 0 ) {
292
+ console . log ( "Info: Implemenations with multiple commit events and max delay between both:" ) ;
293
+ for ( let [ impl , maxDelay ] of this . maxDeltaBetweenCommits . entries ( ) ) {
294
+ if ( maxDelay > 0 ) console . log ( ` ${ impl } : ${ maxDelay } ` ) ;
295
+ }
296
+ console . log ( " Interpretation: Those frameworks make measuring the duration of the benchmark difficult. The results should be checked occasionally for correctness." ) ;
293
297
}
294
- console . log ( " Interpretation: Those frameworks make measuring the duration of the benchmark difficult. The results should be checked occasionally for correctness." ) ;
295
298
}
296
299
}
297
300
0 commit comments