akamai / boomerang

End user oriented web performance testing and beaconing
http://akamai.github.io/boomerang/
Other
1.86k stars 292 forks source link

Javascript profile #293

Closed rohitsethiyasnow closed 4 years ago

rohitsethiyasnow commented 4 years ago

Is it possible in boomerang to capture chrome trace and timeline data?

bluesmoon commented 4 years ago

Are there JavaScript APIs that can be used to pull this data from the page?

rohitsethiyasnow commented 4 years ago

I am not aware of any such APIs. But yeah chrome has a console.profile API which captures the js profile. What i wanted to see was if boomerang can capture similar JS profile and beacon it.

ceckoslab commented 4 years ago

Hello @rohitsethiyasnow

I am not sure if we have access to console.profile() from JavaScript. Also in the current Boomerang version we do not collect traces.

However there is an experimental chrome feature called "JavaScript Self-Profiling API Proposal ". Reference: https://github.com/WICG/js-self-profiling ... as a matter of fact there is a Facebook's Profiler Polyfill as well.

bluesmoon commented 4 years ago

As far as I know, console.profile captures the profile internally to the browser, it doesn't return it. We'd need an API that returns the information. JavaScript doesn't have access to browser internals for security reasons, so unless the browser gave us that data, we couldn't get it.