Due to a missing check, you could resize the window to a width that was too small, and it would trigger an endless while-loop for any table while trying to redistribute remaining space. This has been rectified with an explicit check, as well as a smarter method of redistributing remaining space borrowed from the rewrite.
This also adds explicit width checks for widgets that have borders; if the width is <2, before, it would panic.
Note that the rewrite I have kinda fixes all these issues already, so I don't want to invest too hard into this, but this should be fine as a patch for now.
Also note that minimal heights don't seem to be causing any issues, it just seems to be minimal widths.
Bumps up some dependencies and removes chrono, switching to the time crate instead.
One of side-effects of this change is that local time seems to not work (?)... so all logs are now in UTC. Oh well, this doesn't affect general user behaviour so I'm fine with it.
This is just a temp change, I wanted to remove it just for clarity's
sake among dependencies, and will probably add it back in the future.
For now I'll just stick to std's beef.
Refactor to split up data collection by OS and/or the backing library. The goal is to make it easier to work with and add new OS support, as opposed to how it was prior where we stored OS-independent implementations all in the same file.
Did not update crossterm (and tui-rs) since it seems to have resulted in a massive CPU usage increase. Also fix minor clippy error with a duplicated to_string call.
For the process widget, we now sum the resource usage of the child processes on the parent entry when collapsing in tree mode.
Note that if you search to filter, and collapse, it will not sum the pruned values (values that cannot be seen). This is partly because I'm a bit lazy, and partly because I think this behaviour makes sense.
For example, let's say I search for a process with 4 child processes "AA, AB, BA, BB", with CPU usage 0.1, 0.2, 0.3, 0.4 respectively. Assume the parent process has 0 usage.
- Without filter, it sums to 1.0
- With a filter on A, it would sum to just 0.3
- With a filter on AA, it would sum to 0.1
I think this is fine because I'm treating this as summing any child that is still *visible* somehow. Summing unseen values would probably be weird as it would look like it's not adding up.
Further note that if you had, say, a child "CC" with a usage of, say, 2.0, and its parent of "AB", and you searched for CC in our above example, you would get a sum of 2.2. This is because AB is still visible by the fact that CC was the searched process, and AB must still exist (albeit faded out) in the tree hierarchy, and as such will still be displayed.
Rewrite of the y-axis labeling and scaling for the network widget, along with more customization. This still has one step to be optimized (cache results so we don't have to recalculate the legend each time), but will be done in another PR for sake of this one being too large already.
Furthermore, this change adds linear interpolation at the 0 point in the case a data point shoots too far back - this seems to have lead to ugly gaps to the left of graphs in some cases, because the left hand limit was not big enough for the data point. We address this by grabbing values just outside the time range and linearly interpolating at the leftmost limit. This affects all graph widgets (CPU, mem, network).
This can be optimized, and will hopefully be prior to release in a separate change.
Adds users into the process widget (for Unix-based systems). This shows only in non-grouped modes, similar to state. Search is also supported.
In addition, a quick fix to prevent users from being in grouped mode when they tried to enter tree mode while grouped.
Fixes a bug where you could make the sorting arrow disappear in the mem column if you did:
1. Go to proc widget
2. Switch to memory values from %
3. Press `m`
Refactors to use only heim for Linux builds. This is now much easier to do since the 0.1 version of heim works fine for ARM. This is ideal since having to rely on two separate sources of data isn't the greatest if we can avoid it.
Sysinfo is still required for macOS and Windows, though. Temperature sensors do not work for those from heim, and for some reason, networks also don't work on Windows with heim...?
My personal CPU core calculation is also currently Linux-only, and as such, I'll still rely on sysinfo for Windows and macOS for now.
This isn't really a big optimization or anything btw. Just something I wanted to try.
Making some small changes that would hopefully improve performance a bit.
- Remove redundant string generations for CPU data conversion
- Switch to fnv for PID hashmap and hashsets
- Use buffered reading to avoid having to store too many lines as strings
Fixes some performance regressions and forgotten cleanup.
Changes to attempt to improve performance to match 0.4.x:
- Remove `trace!` and `--debug` for now. These were a significant hog. Removing this dropped initial memory usage by about half.
- Add additional cleaning step for `pid_mapping` during process harvesting. This should hopefully improve memory usage as time goes on.
- Slightly change how we do sorting to hopefully be a bit more optimal? This was just an easy change to make that I spotted.
- Fix broken cleaning child thread task.
Adds persistent search settings across runs, by saving to the config file. Each process widget keeps track of it's *own* behaviour. The previous flags/options are now for *global* behaviour.
The following new behaviour is:
- Relevant flags: `--case_sensitive`, `--whole_word`, and `--regex`, will *override* the current widget's default behaviour.
- Relevant options: `case_sensitive`, `whole_word`, and `regex`, will also *override* the current widget's default behaviour.
As per before, if you set, say, `--case_sensitive`and `case_sensitive=true`, the flag always overrides.
Documentation updates will be done in #248.
Refactors tui-rs usage to the new 0.11.0 release. This release also fixes the highlighting bug from #249, and now, expanding a widget no longer overrides the widget title colour.
This commit also introduces #255, but that seems to be easy to bandaid so hopefully it will get fixed soon?
Fix for an index out-of-bounds by resizing to a smaller terminal just after the program got the terminal size, but right before the terminal started drawing.
Reverts tui upgrade, there are some bugs and issues - namely, issues with rendering text.
We can revert this commit when those bugs are dealt with (should be fine after 0.10.1, tested building from the repo).
This feature allows any column to be sortable.
This also adds:
- Inverting sort for current column with `I`
- Invoking a sort widget with `s` or `F6`. Close with same key or esc.
And:
- A bugfix in regards the basic menu and battery widget
- A lot of refactoring
Update dependencies to most recent versions if applicable. Refactor to deal with breaking changes. Drop MSRV due to dependency issues, just support stable and later.
- Removal of the old slash-space-to-hide behaviour of CPU widget
- Scrolling onto a specific entry will only show that entry
- Showing average is now default
* Uptick some crates, update README dependencies
* Cleanup before modularity feature.
* Fix missing reset zoom on reset
* Fixed reset... not resetting search or data displayed
* Cleaned up options a tiny bit to make more sense.
* Cleaned up some TODOs and the like.
* specify only build master branch.
* Fix typo and run rustfmt.
* Also add rustfmt check to travis... this might be temporary.
* Add a bit on default config files being created in the debian extended description.
* Add rustup component add to travis.
* Disable rustfmt for now, seems to play weird on windows builds.
* Remove unneccesary deprecate ignore.