In the existing code, if traceEvents did not have any importable events, the profile would be marked as empty. This was a bug, as the dev Hermes profiles I was testing with had one X event which made the code work. However we do not need to guarantee (and the spec doesn't seem to) any traceEvents being present as long as we have samples and stack frames.
When I tested a production profile taken from Hermes it did not have any importable events, just a metadata event with a thread name. This PR updates the implementation to iterate over partitioned samples instead of traceEvents so we construct profiles for all thread + process pairs referenced in the samples array.
coverage: 43.608% (+0.08%) from 43.524%
when pulling 8be44afa506388b6ca375d3db67a5427c0853cf3 on zacharyfmarion:zac/use-samples
into a3c0b15935fe125130ef371ec79dbe1c5e744b63 on jlfwong:main.
@jlfwong any chance you could release a new version for this? I'm starting to let people know they can use speedscope for production Hermes profiles here. Will probably get a tweet together once the issue is closed out and this PR lands
In the existing code, if
traceEvents
did not have any importable events, the profile would be marked as empty. This was a bug, as the dev Hermes profiles I was testing with had one X event which made the code work. However we do not need to guarantee (and the spec doesn't seem to) any traceEvents being present as long as we have samples and stack frames.When I tested a production profile taken from Hermes it did not have any importable events, just a metadata event with a thread name. This PR updates the implementation to iterate over partitioned samples instead of traceEvents so we construct profiles for all thread + process pairs referenced in the samples array.