clj-async-profiler
clj-async-profiler copied to clipboard
Feature request: default sorting by name
I feel sorting by name gives you more stable ordering, making it easier to see the changes between two or more runs. I would be happy if it was the default sorting, but if that’s not possible, maybe make it an option to select in overview page and all the graph will open with respect to that option?
I personally find the width sorting much easier for navigation. It allows me to not squint trying to find the most impactful subtree – I know for sure that the widest frames are on the left.
That being said, I'm working on a solution that allows to save this option (among other things) into either the in-memory state of the profiler or bake it into the final HTML. There are a few rough edges to smooth out, so it will either make it into 1.4.0 or one of the subsequent minor releases.
With 1.5.0 release, you can do the following:
(clj-async-profiler.core/set-default-profiling-options {:config {:sort-by :name}})
If you put it into user.clj or a global user.clj, then all generated flamegraphs will be sorted by name by default.
Alternatively, once you generate a flamegraph, open it in the web UI, change the sorting order to Name and press Save config (a newly added button), then the future flamegraphs within the same process will be generated with that Name sorting by default.
Does this fulfill your request?
Yes! Thank you!