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

Function timeEnd

lib/internal/util/debuglog.js:265–293  ·  view source on GitHub ↗

* @param {SafeMap} timesStore * @param {string} traceCategory * @param {string} implementation * @param {number} timerFlags * @param {LogImpl} logImpl * @param {string} logLabel * @param {string} traceLabel * @returns {void}

(
  timesStore,
  traceCategory,
  implementation,
  timerFlags,
  logImpl,
  logLabel = 'default',
  traceLabel = undefined,
)

Source from the content-addressed store, hash-verified

263 * @returns {void}
264 */
265function timeEnd(
266 timesStore,
267 traceCategory,
268 implementation,
269 timerFlags,
270 logImpl,
271 logLabel = 'default',
272 traceLabel = undefined,
273) {
274 // Coerces everything other than Symbol to a string
275 logLabel = `${logLabel}`;
276
277 if (traceLabel !== undefined) {
278 traceLabel = `${traceLabel}`;
279 } else {
280 traceLabel = logLabel;
281 }
282
283 if ((timerFlags & kSkipLog) === 0) {
284 timeLogImpl(timesStore, implementation, logImpl, logLabel);
285 }
286
287 if ((timerFlags & kSkipTrace) === 0) {
288 traceLabel = safeTraceLabel(traceLabel);
289 trace(kTraceEnd, traceCategory, traceLabel, 0);
290 }
291
292 timesStore.delete(logLabel);
293}
294
295/**
296 * @param {SafeMap} timesStore

Callers 1

internalEndTimerFunction · 0.70

Calls 4

safeTraceLabelFunction · 0.85
traceFunction · 0.85
timeLogImplFunction · 0.70
deleteMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…