1class ThemePerformance{constructor(metricPrefix){this.metricPrefix=metricPrefix} 2createStartingMarker(benchmarkName){const metricName=`${this.metricPrefix}:${benchmarkName}` 3return performance.mark(`${metricName}:start`)} 4measureFromEvent(benchmarkName,event){const metricName=`${this.metricPrefix}:${benchmarkName}` 5const startMarker=performance.mark(`${metricName}:start`,{startTime:event.timeStamp});performance.mark(`${metricName}:end`);performance.measure(metricName,`${metricName}:start`,`${metricName}:end`)} 6measureFromMarker(startMarker){const metricName=startMarker.name.replace(/:start$/,'');const endMarker=performance.mark(`${metricName}:end`);performance.measure(metricName,startMarker.name,endMarker.name)} 7measure(benchmarkName,callback){const metricName=`${this.metricPrefix}:${benchmarkName}` 8performance.mark(`${metricName}:start`);callback();performance.mark(`${metricName}:end`);performance.measure(benchmarkName,`${metricName}:start`,`${metricName}:end`)}} 9export const cartPerformance=new ThemePerformance('cart-performance')
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.