[Feature Request] View Multiple Process Flamegraphs at Once
- Dominant language
- TypeScript
- Stars
- 6.8k
- Forks
- 320
- PR merge metrics
- No merged PRs in 30d
Description
Currently the approach to viewing multiple processes/threads is to switch between processes as implemented in [#82](https://github.com/jlfwong/speedscope/issues/82), but it would be very nice if instead we could compare them all on the same screen, to compare what is happening across threads.
This could look like:

and was wondering if there was an easy way to do this. I tried experimenting with the JSON to hack this out with something like:
```
{
"exporter": "speedscope@1.20.0",
"name": "test.txt",
"activeProfileIndex": 0,
"$schema": "https://www.speedscope.app/file-format-schema.json",
"shared": {
"frames": [
{
"name": "event1"
},
{
"name": "event2"
}
]
},
"profiles": [
{
"type": "evented",
"name": "perf-vertx-stacks-01-collapsed-all.txt",
"unit": "none",
"startValue": 0,
"endValue": 500,
"events": [
{
"type": "O",
"frame": 0,
"at": 0
},
{
"type": "O",
"frame": 1,
"at": 6
},
{
"type": "C",
"frame": 0,
"at": 9
},
{
"type": "C",
"frame": 1,
"at": 12
}
]
}
]
}
```
but it gave
```
Failed to load format Error: Tried to leave frame "event1" while frame "event2" was at the top at 9
at h._leaveFrame (speedscope.80eb88d2.js:165:8075)
at h.leaveFrame (speedscope.80eb88d2.js:165:8535)
at speedscope.80eb88d2.js:171:1753
at a (speedscope.80eb88d2.js:171:1800)
at speedscope.80eb88d2.js:171:2361
at Array.map ()
at s (speedscope.80eb88d2.js:171:2354)
at import.7f8cb9f9.js:121:2101
at Generator.next ()
at s (import.7f8cb9f9.js:121:780)
```
so I think this might require some code changes that I'm not familiar with.
Contributor guide
Assessment
This issue has not been assessed yet.