@@ -370,6 +370,19 @@ addEventListener('input', e => {
370
370
}
371
371
} ,
372
372
} ) ;
373
+
374
+ performance . mark ( "Filter Applied" , {
375
+ detail : {
376
+ devtools : {
377
+ dataType : "marker" ,
378
+ color : "secondary" ,
379
+ properties : [
380
+ [ 'Filter Value' , filter . value ]
381
+ ] ,
382
+ tooltipText : "Filter Applied"
383
+ }
384
+ }
385
+ } ) ;
373
386
}
374
387
} ) ;
375
388
@@ -411,6 +424,15 @@ addEventListener('keydown', e => {
411
424
} ) ;
412
425
413
426
function loadPhoto ( fileName ) {
427
+ // Take a start timestamp
428
+ const start = performance . now ( ) ;
429
+ // Measure duration from start to now
430
+ console . timeStamp ( "measure 1" , start , undefined , "My Track" , "My Group" , "primary-light" ) ;
431
+ // Take an end timestamp
432
+ const end = performance . now ( ) ;
433
+ // Measure duration from start to end
434
+ console . timeStamp ( "measure 2" , start , end , "My Track" , "My Group" , "secondary-dark" ) ;
435
+
414
436
const loadStartTime = performance . now ( ) ;
415
437
const perfMeasureDescription = `Loading photo: ${ fileName } ` ;
416
438
@@ -435,6 +457,19 @@ function loadPhoto(fileName) {
435
457
} ,
436
458
} ) ;
437
459
460
+ performance . mark ( "Photo Loaded" , {
461
+ detail : {
462
+ devtools : {
463
+ dataType : "marker" ,
464
+ color : "secondary" ,
465
+ properties : [
466
+ [ 'Photo' , fileName ]
467
+ ] ,
468
+ tooltipText : "Photo Loaded"
469
+ }
470
+ }
471
+ } ) ;
472
+
438
473
resolve ( imageEl ) ;
439
474
} , { once : true } ) ;
440
475
} ) ;
0 commit comments