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

Function timeLog

lib/internal/util/debuglog.js:306–333  ·  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 * @param {any[]} args * @returns {void}

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

Source from the content-addressed store, hash-verified

304 * @returns {void}
305 */
306function timeLog(
307 timesStore,
308 traceCategory,
309 implementation,
310 timerFlags,
311 logImpl,
312 logLabel = 'default',
313 traceLabel = undefined,
314 args,
315) {
316 // Coerces everything other than Symbol to a string
317 logLabel = `${logLabel}`;
318
319 if (traceLabel !== undefined) {
320 traceLabel = `${traceLabel}`;
321 } else {
322 traceLabel = logLabel;
323 }
324
325 if ((timerFlags & kSkipLog) === 0) {
326 timeLogImpl(timesStore, implementation, logImpl, logLabel, args);
327 }
328
329 if ((timerFlags & kSkipTrace) === 0) {
330 traceLabel = safeTraceLabel(traceLabel);
331 trace(kTraceInstant, traceCategory, traceLabel, 0);
332 }
333}
334
335/**
336 * @type {Record<string, SafeMap>}

Callers 1

internalLogTimerFunction · 0.70

Calls 3

safeTraceLabelFunction · 0.85
traceFunction · 0.85
timeLogImplFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…