(label: string)
| 30 | * Should be used in pair with startMeasuring |
| 31 | */ |
| 32 | export function stopMeasuring(label: string): void { |
| 33 | if (!enablePerfLogging) { |
| 34 | return; |
| 35 | } |
| 36 | |
| 37 | const {startLabel, labelName, endLabel} = labels(label); |
| 38 | /* tslint:disable:ban */ |
| 39 | performance.mark(endLabel); |
| 40 | performance.measure(labelName, startLabel, endLabel); |
| 41 | performance.clearMarks(startLabel); |
| 42 | performance.clearMarks(endLabel); |
| 43 | /* tslint:enable:ban */ |
| 44 | } |
| 45 | |
| 46 | export function labels(label: string) { |
| 47 | const labelName = `${PERFORMANCE_MARK_PREFIX}:${label}`; |
no test coverage detected
searching dependent graphs…