* @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, )
| 263 | * @returns {void} |
| 264 | */ |
| 265 | function 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 |
no test coverage detected
searching dependent graphs…