This feature extends the console.timeStamp() API, in a backwards-compatible manner, to provide a high-performance method for instrumenting applications and surfacing timing data to the Performance panel in DevTools. Timing entries added with the API can have a custom timestamp, duration and presentation options (track / swimlane and color).
Developers want an API that allows to add data from their own instrumentation to the native browser profiling tool. This is evident in the third party tooling available for web frameworks, which contain framework-specific details but lack data native to the browser. As a consequence, third party tooling maintainers need to reimplement features of the native browser tools while developers are forced to switch back and forth between third-party tools and the browser tools to optimize the performance of their web apps. To address this, this feature extends the console.timeStamp. This API currently adds markers to the browser's Performance panel, but it lacks the ability to represent durations or customize how the data is presented. The extension implemented by this feature allows developers to include duration information and presentation options for these markers. All while keeping it as performant as possible and a no-op when DevTools is not tracing. This allows developers and abstraction maintainers to instrument and visualize the runtime performance of complex apps in the context of the browser's own performance data.