-
Notifications
You must be signed in to change notification settings - Fork 237
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
Process sorting in tree mode #683
Comments
Both of these are currently expected behaviour. When you go into tree mode, the current behaviour is to put it into PID mode first. And if you sort by, say, CPU, it sorts on a per-level basis. So here, since the top-level chrome process is 0.3%, it's put before picom, which is 0.2%, and firefox, which is also 0.2%. However, inside that level the chrome process has child processes that are greater than 0.3%, but since they are of a different level, they don't go above the original chrome process. However, regarding the first part (the default sorting order), I was actually planning on changing this since I didn't really like it either (see #571, though that's been stalled due to IRL reasons like drowning under schoolwork). This was honestly just arbitrary behaviour I programmed in way back when I originally implemented the feature. As for the second part, this is the same behaviour as htop IIRC, which is what I originally copied when implementing this feature. Maybe I'll think of something else in the future for alternative optional behaviour, but for now, that's staying as is. But since both of these are expected behaviour, I'll be closing this for now. |
Thanks for your explanation, I get it. |
Yeah, that's kinda what I was thinking - I already do something similar if the user collapses the entry, so maybe an option where all child usage propagates up to the parents by default might be nice. |
Thanks for letting me know. I created a feature request regarding this matter #684 |
Describe the bug
In tree mode, the process is sorted ascending by PID by default. Is this expected or there's a good reason for it? I'd glad if it remains being sorted by CPU. Secondly, even if clicking on "CPU" column title to sort by CPU, the process does not appear to be sort by CPU. Some processes that were using enormous amount of CPU now disappear from the order. I don't even know what's the logic behind sorting in tree mode.
What operating system/architecture are you using?
Macos Catalina
What terminal are you using
bottom
on?Macos default Terminal
What version are you on?
bottom 0.6.8
How did you install
bottom
?brew install bottom
How can we reproduce this?
Switch to tree mode by hitting
t
or directly entering tree mode by runningbtm -T
What is the actual behaviour?
When entering tree mode, process is sorted by PID. When manually sort by CPU, it does not sort by CPU by some mysterious logic.
What is the expected behaviour?
Process should be sorted by CPU by default in tree mode. And the order must somehow logical, at least the most consuming processes don't get out of the top.
The text was updated successfully, but these errors were encountered: