'Failed to execute 'measure' on 'Performance': The mark '<yourMarkName>' does not exist
I want to measure the duration of my async operation and I'm setting marks for that. The first mark I set before the async operation start and the end mark with measure I set in the callback of async operation like this:
performance.mark('async start');
someAsyncFunction(function callback() {
performance.mark('async end');
performance.measure('async operation', 'async start', 'async end');
});
But it gives me this error:
Unhandled Rejection (SyntaxError): Failed to execute 'measure' on 'Performance': The mark 'async start' does not exist.
I tried to find a similar answer but didn't find anything about it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
