(name: string)
| 30 | } |
| 31 | |
| 32 | function mark(name: string): PerformanceMark { |
| 33 | marks.set(name, now()) |
| 34 | // Return a minimal PerformanceMark-like object to satisfy the interface. |
| 35 | // React/OTel only use mark() for side effects, not the return value. |
| 36 | return { |
| 37 | name, |
| 38 | entryType: 'mark', |
| 39 | startTime: marks.get(name)!, |
| 40 | duration: 0, |
| 41 | } as PerformanceMark |
| 42 | } |
| 43 | |
| 44 | function measure( |
| 45 | name: string, |