(mode: InstrumentationMode = 'counters')
| 145 | |
| 146 | let profileFunctionFactory: <F extends Function>(fn: F, name: string, type?: MemberType) => F; |
| 147 | export function enable(mode: InstrumentationMode = 'counters') { |
| 148 | profileFunctionFactory = |
| 149 | mode && |
| 150 | { |
| 151 | counters: countersProfileFunctionFactory, |
| 152 | timeline: timelineProfileFunctionFactory, |
| 153 | }[mode]; |
| 154 | |
| 155 | tracingLevel = |
| 156 | { |
| 157 | lifecycle: Level.lifecycle, |
| 158 | timeline: Level.timeline, |
| 159 | }[mode] || Level.none; |
| 160 | } |
| 161 | |
| 162 | try { |
| 163 | if (appConfig && appConfig.profiling) { |
no outgoing calls
no test coverage detected