margelo / react-native-release-profiler

A fast and simple library to passively profile JS/Hermes performance in production and release builds.
https://margelo.io
MIT License
188 stars 2 forks source link

feat: profiling on web #7

Closed kirillzyusko closed 1 week ago

kirillzyusko commented 2 weeks ago

A second PR that actually implements profiling and saves profiles as file.

Pretty important findings:

Android Web
image image

An example of profile (Hermes format):

trace-2024-06-25T08_42_59.123Z.cpuprofile.txt

An example of the converted file:

trace-2024-06-25T08_42_59.123Z.cpuprofile.txt-converted.json

hannojg commented 1 week ago

even though we can specify sampling interval -> OS will ignore an

lets make sure to add that to the jsdoc comments + maybe document it in the readme (once we add a we b section!)

hannojg commented 1 week ago

@kirillzyusko do we need in the package json some pointer to the web index file?

kirillzyusko commented 1 week ago

@hannojg hm, I don't think so. I've tested on the app, and we consume module folder from lib and if we run on web then automatically index.web.js file is used, so I don't think it's needed here 🤔