Programmatically capture output frame rate in Chrome (or any other browser) with JavaScript?

We’ve been into some performance issues (slowness) in the Chrome browser since the mid 2023.

We are yet to find the root cause of the issue. But, in the meanwhile we want to send some statistics to our logging system to analyse the data and get towards the problem more efficiently.

We successfully captured the frame rate of our feature (a web video application).

But, we also want to capture the frame rate of the application itself, where our feature has been integrated with. So that we can get some insights about the number of users that are impacted.

I can enable the “Frame Rendering Stats” in my Chrome to see the fps meter, but I couldn’t find anything where I can get the values for the output frame rate within my feature using JavaScript.

Question: Does somebody know how to programmatically get the output frame rate of the application?