MCPcopy Index your code
hub / github.com/nodejs/node / createPerformanceResourceTiming

Function createPerformanceResourceTiming

lib/internal/perf/resource_timing.js:209–231  ·  view source on GitHub ↗
(
  requestedUrl,
  initiatorType,
  timingInfo,
  cacheMode = '',
  bodyInfo,
  responseStatus,
  deliveryType,
)

Source from the content-addressed store, hash-verified

207});
208
209function createPerformanceResourceTiming(
210 requestedUrl,
211 initiatorType,
212 timingInfo,
213 cacheMode = '',
214 bodyInfo,
215 responseStatus,
216 deliveryType,
217) {
218 const resourceTiming = new PerformanceResourceTiming(kSkipThrow, requestedUrl, 'resource');
219
220 resourceTiming[kInitiatorType] = initiatorType;
221 resourceTiming[kRequestedUrl] = requestedUrl;
222 // https://fetch.spec.whatwg.org/#fetch-timing-info
223 // This class is using timingInfo assuming it's already validated.
224 // The spec doesn't say to validate it in the class construction.
225 resourceTiming[kTimingInfo] = timingInfo;
226 resourceTiming[kCacheMode] = cacheMode;
227 resourceTiming[kDeliveryType] = deliveryType;
228 resourceTiming[kResponseStatus] = responseStatus;
229
230 return resourceTiming;
231}
232
233// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing
234function markResourceTiming(

Callers 1

markResourceTimingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…