Open julienw opened 5 months ago
When implementing the marker schema, this display location "stack-chart" has been added in https://github.com/firefox-devtools/profiler/blob/a43a86c1c6fd14e26fe146eab4f2fb9b05920e92/src/types/markers.js#L100-L101. The goal is to make it possible to configure markers to be displayed in the stack-chart. Currently it's hardcoded for UserTiming only.
This shouldn't be too hard. Currently it's done this way:
The data for the stack chart is computed with this when the option "show user timing" is checked: https://github.com/firefox-devtools/profiler/blob/a43a86c1c6fd14e26fe146eab4f2fb9b05920e92/src/selectors/per-thread/composed.js#L101-L115
The markers to be displayed are computed with: https://github.com/firefox-devtools/profiler/blob/a43a86c1c6fd14e26fe146eab4f2fb9b05920e92/src/selectors/per-thread/markers.js#L540-L549 https://github.com/firefox-devtools/profiler/blob/a43a86c1c6fd14e26fe146eab4f2fb9b05920e92/src/selectors/per-thread/markers.js#L342-L346
Instead of isUserTimingMarker we should use something like: https://github.com/firefox-devtools/profiler/blob/a43a86c1c6fd14e26fe146eab4f2fb9b05920e92/src/selectors/per-thread/markers.js#L398-L413 With "stack-chart" instead of "marker-table".
isUserTimingMarker
And probably rename some of the functions for consistency.
Here is a profile with such a marker: https://share.firefox.dev/45a8ISC
┆Issue is synchronized with this Jira Task
see https://phabricator.services.mozilla.com/D212718 for the patch related to this on the devtools side.
When implementing the marker schema, this display location "stack-chart" has been added in https://github.com/firefox-devtools/profiler/blob/a43a86c1c6fd14e26fe146eab4f2fb9b05920e92/src/types/markers.js#L100-L101. The goal is to make it possible to configure markers to be displayed in the stack-chart. Currently it's hardcoded for UserTiming only.
This shouldn't be too hard. Currently it's done this way:
The data for the stack chart is computed with this when the option "show user timing" is checked: https://github.com/firefox-devtools/profiler/blob/a43a86c1c6fd14e26fe146eab4f2fb9b05920e92/src/selectors/per-thread/composed.js#L101-L115
The markers to be displayed are computed with: https://github.com/firefox-devtools/profiler/blob/a43a86c1c6fd14e26fe146eab4f2fb9b05920e92/src/selectors/per-thread/markers.js#L540-L549 https://github.com/firefox-devtools/profiler/blob/a43a86c1c6fd14e26fe146eab4f2fb9b05920e92/src/selectors/per-thread/markers.js#L342-L346
Instead of
isUserTimingMarker
we should use something like: https://github.com/firefox-devtools/profiler/blob/a43a86c1c6fd14e26fe146eab4f2fb9b05920e92/src/selectors/per-thread/markers.js#L398-L413 With "stack-chart" instead of "marker-table".And probably rename some of the functions for consistency.
Here is a profile with such a marker: https://share.firefox.dev/45a8ISC
┆Issue is synchronized with this Jira Task