1'use strict'; 2 3function createWarmupTelemetry(context) { 4 return { 5 cycleId: `warmup-${Date.now()}-${Math.random().toString(16).slice(2, 8)}`, 6 swVersion: SW_VERSION, 7 reason: context && context.reason ? context.reason : 'unknown', 8 source: 'unknown', 9 sourceFail: 0, 10 policyReject: 0, 11 fetchFail: 0, 12 success: 0, 13 listReceived: 0, 14 listSafe: 0, 15 listProcessed: 0, 16 reasonCounts: {}, 17 }; 18} 19 20function telemetryAddReason(telemetry, reason, fallbackCode) { 21 if (!telemetry) { 22 return; 23 } 24 25 const normalized = normalizeWarmupReason(reason, fallbackCode || WARMUP_REASON_CODES.UNKNOWN); 26 telemetry.reasonCounts[normalized.code] = (telemetry.reasonCounts[normalized.code] || 0) + 1; 27}
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.