firefox-devtools / firefox-devtools/profiler

Option for custom marker ordering

Open
#5,152 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.5k
Forks
491
Avg merge
3d 46m
Merged PRs (30d)
27

Description

The [vernier](https://github.com/jhawthorn/vernier) CRuby profiler uses a [fork](https://github.com/tenderlove/profiler) of the Firefox profiler as it's viewer, and I thought I'd first check if this feature would be generally useful before possibly implementing it in the fork.

I'm trying to order markers within each category/bucket without changing their names. Currently markers are sorted by name [here](https://github.com/firefox-devtools/profiler/blob/e67240ac067c1c931b4861ac2d9db5b7723be598/src/profile-logic/marker-timing.js#L182-L231). There's an example of what I'm trying to achieve in the description of https://github.com/jhawthorn/vernier/pull/98 where I tried to hack it into vernier's profile output without making changes to the viewer.

I would like to be able to provide a marker attribute like 'sortIndex' along with the name and category such that the sorting is performed by category first, then this index if provided else the name.

┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-773)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.