Просмотр исходного кода

[ContentCacheMetrics] add new metric for absolute time spent in PDF.js

Jakob Ackermann 5 лет назад
Родитель
Сommit
97693b49c2
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      services/clsi/app/js/ContentCacheMetrics.js

+ 3 - 0
services/clsi/app/js/ContentCacheMetrics.js

@@ -30,6 +30,9 @@ function emitPdfStats(stats, timings) {
 function emitPdfCachingStats(stats, timings) {
 function emitPdfCachingStats(stats, timings) {
   if (!stats['pdf-size']) return // double check
   if (!stats['pdf-size']) return // double check
 
 
+  // How much extra time did we spent in PDF.js?
+  Metrics.timing('compute-pdf-caching', timings['compute-pdf-caching'])
+
   // How large is the overhead of hashing up-front?
   // How large is the overhead of hashing up-front?
   const fraction =
   const fraction =
     timings.compileE2E - timings['compute-pdf-caching'] !== 0
     timings.compileE2E - timings['compute-pdf-caching'] !== 0