You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add ability to sort scopes in table view by fields other than count (#243)
### Checklist
* [x] I have read the [Contributor Guide](../CONTRIBUTING.md)
* [x] I have read and agree to the [Code of
Conduct](../CODE_OF_CONDUCT.md)
* [x] I have added a description of my changes and why I'd like them
included in the section below
### Description of Changes
I wanted to be able to sort the scopes in table views by fields other
than count. This PR is nowhere near complete, but it does work and shows
one way to implement this feature. If this direction makes sense then
I'm happy to put in the work to get it up to snuff. If not, then at
least this branch exists for anyone who wants it.
Not all header fields are supported right now, but for the numerical
fields, clicking on the header will sort the scopes in descending order
by that field. Clicking the same header again will sort in ascending
order. An arrow indicates which column is sorted and in what direction.
To implement this, a new field `sort_order` is added to `ProfilerUI`.
For example, when you open, the default remains the same, sorted by
Count in descending order:
<img width="782" alt="Screenshot 2025-06-24 at 6 02 53 PM"
src="https://github.com/user-attachments/assets/327f7489-db1b-49d4-a365-a25c750bc30a"
/>
Here's the result of clicking on Total Self Time twice:
<img width="782" alt="Screenshot 2025-06-24 at 6 02 59 PM"
src="https://github.com/user-attachments/assets/2d150ebe-3284-4281-9963-0fc8bf0bf98e"
/>
### Related Issues
See #126
0 commit comments