Sample durations are computed incorrectly
Hi, nice work!
I found a problem in the demo profile: https://bit.ly/3fapBSS
If you look at the call tree, the root node reports a runtime of 8.8 seconds, but only a 1.2 second window is shown.
Then I took a look at filteredThread.samples.duration (on the web console), and found out that even just the first sample has a duration of 1224.376363ms. That's likely wrong - it might be the duration of the root function, but if you convert it to samples, the duration of the sample needs to be clipped off so that it doesn't overlap with the next sample.
I admit that a samples-based profile format is not the best fit for a tracing-based profiler.
Edited by Markus Stange