(fn, isAsync)
| 580 | * @returns {() => void} function wrapped in codspeed root frame |
| 581 | */ |
| 582 | const wrapFunctionWithFrame = (fn, isAsync) => { |
| 583 | if (isAsync) { |
| 584 | return async function __codspeed_root_frame__() { |
| 585 | await fn(); |
| 586 | }; |
| 587 | } |
| 588 | |
| 589 | return function __codspeed_root_frame__() { |
| 590 | fn(); |
| 591 | }; |
| 592 | }; |
| 593 | |
| 594 | /** |
| 595 | * @param {string} uri URI |
no test coverage detected