@@ -312,6 +312,8 @@ function populateGallery(images) {
312
312
}
313
313
} ,
314
314
} ) ;
315
+
316
+ console . timeStamp ( "Photo created" , imageCreationStart , undefined , "Console timestamp track" , customPerformanceTrackGroupName , "tertiary-dark" ) ;
315
317
} ) ;
316
318
}
317
319
@@ -424,15 +426,6 @@ addEventListener('keydown', e => {
424
426
} ) ;
425
427
426
428
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
-
436
429
const loadStartTime = performance . now ( ) ;
437
430
const perfMeasureDescription = `Loading photo: ${ fileName } ` ;
438
431
@@ -457,7 +450,7 @@ function loadPhoto(fileName) {
457
450
} ,
458
451
} ) ;
459
452
460
- performance . mark ( "Photo Loaded " , {
453
+ performance . mark ( "Photo loaded " , {
461
454
detail : {
462
455
devtools : {
463
456
dataType : "marker" ,
@@ -470,6 +463,8 @@ function loadPhoto(fileName) {
470
463
}
471
464
} ) ;
472
465
466
+ console . timeStamp ( "Photo loaded" , loadStartTime , undefined , "Console timestamp track" , customPerformanceTrackGroupName , "primary-light" ) ;
467
+
473
468
resolve ( imageEl ) ;
474
469
} , { once : true } ) ;
475
470
} ) ;
0 commit comments