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

Function markResourceTiming

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

Source from the content-addressed store, hash-verified

232
233// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing
234function markResourceTiming(
235 timingInfo,
236 requestedUrl,
237 initiatorType,
238 global,
239 cacheMode,
240 bodyInfo,
241 responseStatus,
242 deliveryType = '',
243) {
244 // https://w3c.github.io/resource-timing/#dfn-setup-the-resource-timing-entry
245 assert(
246 cacheMode === '' || cacheMode === 'local',
247 'cache must be an empty string or \'local\'',
248 );
249 const resource = createPerformanceResourceTiming(
250 requestedUrl,
251 initiatorType,
252 timingInfo,
253 cacheMode,
254 bodyInfo,
255 responseStatus,
256 deliveryType,
257 );
258
259 enqueue(resource);
260 bufferResourceTiming(resource);
261 return resource;
262}
263
264module.exports = {
265 PerformanceResourceTiming,

Callers 4

finalizeAndReportTimingFunction · 0.85
fetchFinaleFunction · 0.85
finalizeAndReportTimingFunction · 0.85
processResponseEndOfBodyFunction · 0.85

Calls 4

bufferResourceTimingFunction · 0.85
enqueueFunction · 0.70
assertFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…