MCPcopy
hub / github.com/di-sukharev/opencommit / finalizeAndReportTiming

Function finalizeAndReportTiming

out/cli.cjs:59942–59973  ·  view source on GitHub ↗
(response, initiatorType = "other")

Source from the content-addressed store, hash-verified

59940 request: request3,
59941 processResponseEndOfBody: handleFetchDone,
59942 processResponse,
59943 dispatcher: init.dispatcher ?? getGlobalDispatcher()
59944 // undici
59945 });
59946 return p4.promise;
59947 }
59948 function finalizeAndReportTiming(response, initiatorType = "other") {
59949 if (response.type === "error" && response.aborted) {
59950 return;
59951 }
59952 if (!response.urlList?.length) {
59953 return;
59954 }
59955 const originalURL = response.urlList[0];
59956 let timingInfo = response.timingInfo;
59957 let cacheState = response.cacheState;
59958 if (!urlIsHttpHttpsScheme(originalURL)) {
59959 return;
59960 }
59961 if (timingInfo === null) {
59962 return;
59963 }
59964 if (!response.timingAllowPassed) {
59965 timingInfo = createOpaqueTimingInfo({
59966 startTime: timingInfo.startTime
59967 });
59968 cacheState = "";
59969 }
59970 timingInfo.endTime = coarsenedSharedCurrentTime();
59971 response.timingInfo = timingInfo;
59972 markResourceTiming(
59973 timingInfo,
59974 originalURL,
59975 initiatorType,
59976 globalThis,

Callers 1

handleFetchDoneFunction · 0.85

Calls 4

urlIsHttpHttpsSchemeFunction · 0.85
createOpaqueTimingInfoFunction · 0.85
markResourceTimingFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…