-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New layout for the marker chart: Display stack-based markers in a stack-chart-like layout #3141
Comments
I believe this feature request could be handled by the marker set feature. Creating a marker set would logically group markers together into a stack-like chart. I'm not sure how it would work with markers of different types though, and if that's something different. Also, it would be good to be explicit on how much we care if markers we receive really form a stack. True stack-based markers layout:
This is not a true stack-based marker, and creates difficulties in resolving a stack-like view. Is this worth caring about and checking? There's no guarantee in the markers of how to resolve something like this. In the JS tracer view, I ended up creating some heuristics to guess what this meant. My issues there were from float precision issues, even though the underlying data was a real stack. However, markers provide no guarantees of how well ordered they are.
|
I would enforce a nesting by clamping the endTime of the "inner" marker, and trusting the startTime for deciding which marker is the inner marker. E.g. in your example, since B started before D, D is the inner marker, and D must end before B ends. We could try to avoid these issues entirely by switching from float milliseconds to integer nanoseconds for our timestamps. |
The logic how I handled it with JS tracer has ASCII art examples of fixing various issues. I think it's decently robust. profiler/src/profile-logic/js-tracer.js Lines 314 to 328 in 63f4c69
Open tracing has a bit more complicated and unique solution for this type of nesting issue. I wouldn't advocate for it, but it's probably worth listing some other prior art. |
👀
I'd be happy to help on the Firefox side, please file bugs as needed. Thought: Maybe an even more flexible (but obviously more complex) solution would be to use whatever integer value we get from the OS, and mention the corresponding unit somewhere in the profile metadata. This could potentially remove all the float/double computations happening until the very end when it is displayed in human-friendly format, and would also carry the inherent precision of each platform if that was useful. But we can discuss all this later... |
This changeset changes the type definition for marker schema field types and for the marker schema itself, to include the new field types 'flow-id' and 'terminating-flow-id'. It also has some minimal changes to treat the new field types as if they were unique-string fields. Somewhat unrelated to flows, it also adds an optional `isStackBased` field to the marker schema type, which is currently unused. This is for firefox-devtools#3141 . Additionally, it increments the version of the two profile formats, so that profiles with the new field types won't be loaded by older front-ends.
This changeset changes the type definition for marker schema field types and for the marker schema itself, to include the new field types 'flow-id' and 'terminating-flow-id'. It also has some minimal changes to treat the new field types as if they were unique-string fields. Somewhat unrelated to flows, it also adds an optional `isStackBased` field to the marker schema type, which is currently unused. This is for firefox-devtools#3141 . Additionally, it increments the version of the two profile formats, so that profiles with the new field types won't be loaded by older front-ends.
This PR changes the type definition for marker schema field types and for the marker schema itself, to include the new field types 'flow-id' and 'terminating-flow-id'. It also has some minimal changes to treat the new field types as if they were unique-string fields. Somewhat unrelated to flows, it also adds an optional `isStackBased` field to the marker schema type, which is currently unused. This is for #3141 . Additionally, it increments the version of the two profile formats, so that profiles with the new field types won't be loaded by older front-ends.
This changeset changes the type definition for marker schema field types and for the marker schema itself, to include the new field types 'flow-id' and 'terminating-flow-id'. It also has some minimal changes to treat the new field types as if they were unique-string fields. Somewhat unrelated to flows, it also adds an optional `isStackBased` field to the marker schema type, which is currently unused. This is for firefox-devtools#3141 . Additionally, it increments the version of the two profile formats, so that profiles with the new field types won't be loaded by older front-ends.
I'd like to propose two changes:
This will make it a lot more obvious "what's happening" at any given time on the selected thread. It eliminates the need to scroll down to find a marker that runs during the time that the user is looking at.
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: