(type: string, desc?: string)
| 11 | > |
| 12 | |
| 13 | export function makeTimings(type: string, desc?: string) { |
| 14 | const timings: Timings = { |
| 15 | [type]: [{ desc, start: performance.now() }], |
| 16 | } |
| 17 | Object.defineProperty(timings, 'toString', { |
| 18 | value: function () { |
| 19 | return getServerTimeHeader(timings) |
| 20 | }, |
| 21 | enumerable: false, |
| 22 | }) |
| 23 | return timings |
| 24 | } |
| 25 | |
| 26 | function createTimer(type: string, desc?: string) { |
| 27 | const start = performance.now() |
no test coverage detected