Commit Graph

236 Commits

Author SHA1 Message Date
ClementTsang 70242bc2b2 refactor: remove beef dependency for now
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.
2021-07-12 22:31:57 -04:00
ClementTsang 330a9e8abd other: Remove '-nightly- from nightly version 2021-06-29 08:19:36 -04:00
ClementTsang 8a8360726b docs + other: Mention Ubuntu in install, bump to 0.6.3-nightly 2021-06-27 20:12:09 -04:00
ClementTsang 0bbee6743f other: Add 'nightly' to version to Cargo.toml 2021-06-27 19:52:48 -04:00
Clement Tsang 985959ec1c
uptick: 0.6.2 (#526) 2021-06-26 14:03:16 -04:00
Clement Tsang 4569532fb1
deps: update sysinfo to 0.18.2 (#524) 2021-06-26 02:14:44 -04:00
Clement Tsang 63f9ed6199
deps: Switch back from dirs-next to dirs (#492)
Since it's supported again, seems like a good time to switch back to
dirs.
2021-06-06 18:58:53 -04:00
Clement Tsang 6847f2ff0c
refactor: split up data collection by OS (#482)
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.
2021-05-15 21:57:02 -04:00
Clement Tsang ee6228c2b6
refactor: switch to procfs library (#479)
Switch the Linux proc parts to the procfs library: https://crates.io/crates/procfs.
2021-05-13 23:41:43 -04:00
Clement Tsang b1b1e94e6b
uptick: 0.6.1 (#475) 2021-05-11 19:03:15 -04:00
Clement Tsang 244a17cbef
uptick: 0.6.0 (#471)
Update versions to 0.6.0.
2021-05-09 17:51:05 -04:00
Clement Tsang 574c2c1df7
change: switch from sysinfo to heim for cpu usage in macOS and Windows (#467)
Due to #404, I've just moved all CPU usage calculations over to heim.
2021-05-09 01:39:42 -04:00
Clement Tsang e367a37b1a
deps: Update dependencies 2021-05-08 (#466)
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.
2021-05-08 19:55:01 -04:00
Clement Tsang e63a0b4082
refactor: Unify disk conversion to string step (#446)
Refactor to unify the process disk usage -> string into one function.
2021-04-07 20:52:29 -04:00
Clement Tsang 5bd9e4f6ae
feature: Collapsing in tree mode sums usage to parent (#445)
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.
2021-04-05 01:19:17 -04:00
Clement Tsang 405ce64a02
refactor: Switch from fnv to fxhash (#444)
Switches to fxhash from fnv, which should be a bit faster.
2021-04-04 20:48:19 -04:00
Clement Tsang eb6a737d34
feature: Rework network y-axis, linear interpolation for off-screen data (#437)
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.
2021-04-04 05:38:57 -04:00
Clement Tsang 53d8bdae32
feature: User info in proc widget for Unix-based systems (#425)
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.
2021-02-28 17:40:55 -05:00
Clement Tsang cb1191ff35
deps: Update various deps as per 2021-02-19 (#420)
Major update is tui-rs from 0.13 to 0.14.  This change allows us to update our tables to make them look nicer!
2021-02-19 17:57:39 -05:00
Clement Tsang f2e6b9232d
deps: Update beef as per RUSTSEC-2020-0122 (#402) 2021-02-03 15:07:13 -05:00
Clement Tsang 58e18da0c3
uptick: 0.5.7 (#399) 2021-01-30 20:23:18 -05:00
Clement Tsang e30518bf62
bug: Fix missing sorting arrow when for non-% mem (#389)
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`
2021-01-12 21:41:59 -05:00
Clement Tsang 837c382ee9
refactor: Cut out sysinfo from Linux builds (#368)
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.
2020-12-21 20:24:27 -05:00
Clement Tsang 82b39e361d
other: Turn off debug and turn on LTO in release profile again (#367) 2020-12-18 00:40:55 -05:00
Clement Tsang bfdaa09e3a
uptick: 0.5.6 (#362) 2020-12-17 18:42:08 -05:00
Clement Tsang 682f6493d1
refactor: re-use heim for ARM targets if possible (#360)
Use heim on ARM targets again where appropriate.
2020-12-17 17:57:38 -05:00
Clement Tsang 4471ecc161
deps: Update various dependencies (#358) 2020-12-16 00:41:54 -05:00
Clement Tsang 49cfc75aca
deps: Update to heim 0.1 (#354) 2020-12-15 21:34:45 -05:00
Clement Tsang 7272786e86
uptick: 0.5.5 (#356) 2020-12-15 00:05:18 -05:00
Clement Tsang 5d7697d3da
refactor: More minor optimization changes (#353)
- Move data rather than cloning during data transferring step
- Try using beef?
2020-12-12 21:06:46 -05:00
Clement Tsang 766fe25c55
refactor: Use feature flags to avoid building with fern and log (#351) 2020-12-11 20:39:32 -05:00
Clement Tsang 8c4ad90e67
refactor: Another small optimization pass (#350)
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
2020-12-11 19:54:02 -05:00
Clement Tsang 74f4b386d7
uptick: 0.5.4 (#348) 2020-12-10 22:57:54 -05:00
Clement Tsang fd003f84da
bug: Fix some performance regressions (#344)
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.
2020-12-10 22:29:25 -05:00
Clement Tsang e56367fcbb
refactor: Clean up some parts of data harvesting (#336) 2020-12-03 23:45:54 -05:00
Clement Tsang 86169871cb
refactor: Simplify data harvesting (#335)
Refactors the data harvesting system function names.
2020-11-30 19:40:17 -05:00
Clement Tsang 867b8d43e9
deps: update dependencies (#334) 2020-11-28 18:29:23 -05:00
ClementTsang 7131a05e62 uptick: 0.5.3 2020-11-26 19:36:01 -05:00
ClementTsang 781691d3c9 uptick: 0.5.2 2020-11-25 20:39:37 -05:00
Clement Tsang 6aa0dd64a6
other: Switch to once_cell (#324)
Switch from lazy_static to once_cell.
2020-11-22 16:44:40 -05:00
ClementTsang 2d127f198e ci: uptick to 0.5.1, fix ci 2020-11-22 02:33:48 -05:00
ClementTsang 1cb580b91f docs: Update README and changelog for 0.5.0 2020-11-20 14:47:55 -05:00
Clement Tsang e43456207b
feature: default colour schemes (#296)
Adds some default colour choices to choose from.
2020-11-15 05:16:47 -05:00
Clement Tsang d0254dfb08
deps: update anyhow, crossterm, futures, regex, thiserror, toml (#293)
Updates dependencies to their most recent versions as of Nov 02, 2020.
2020-11-02 23:52:45 -05:00
Clement Tsang 271592936b
deps: Bump dependencies that require uom <0.29.0 (#274)
Updates dependencies that depend on uom (battery and heim), due to requiring 0.30 for the newest nightly version of Rust.
2020-11-02 15:04:54 -05:00
Clement Tsang 309ebd8dc3
deps: switch from dirs to dirs-next (#285)
Addresses RUSTSEC-2020-0053.
2020-11-01 22:03:29 -05:00
Clement Tsang 5675d8192c
other: more traces to debug, update some deps (#264)
Minor update to update some dependencies and remove some traces.
2020-10-02 22:12:07 -04:00
Clement Tsang 57e87d88d0
feature: Add persistent search settings (#257)
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.
2020-09-28 19:50:21 -04:00
Clement Tsang 7eff79395d
bug: fix chart and data point overlap (#256)
Update to tui-rs, which fixes #255, as well as some miscellaneous things like updating changelogs and travis.
2020-09-27 14:23:18 -04:00
Clement Tsang 750d8f3cb7 refactor: tui-rs 0.11.0 refactor (#253)
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?
2020-09-26 20:21:59 -04:00
Clement Tsang b0b174eb98
bug: Fix for index oob caused by terminal size mismatch (#238)
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.
2020-09-18 12:35:32 -04:00
Clement Tsang eb8295c430
feature: Adds tree view (#223)
Adds a tree process view to bottom.

Currently uses a pretty jank method of column width setting, should get fixed in #225.
2020-09-06 23:03:03 -04:00
Clement Tsang 22278d7d75
other: aarch64 support (#217)
Adds theoretical aarch64 support.
2020-09-02 02:59:51 -04:00
Clement Tsang a4ddd649e1
refactor: Update error messages w/ anyhow and thiserror (#216)
Refactoring and updating of error messages + tests to be more useful.
2020-08-31 23:59:33 -04:00
Clement Tsang 3431411215
other: Add autocomplete file generation (#213)
Adds shell completion generation as part of the build, as well as tweaking install scripts/templates/CI to use them.
2020-08-31 17:50:21 -04:00
ClementTsang c6a20a1420 deps: Update battery, sysinfo 2020-08-29 20:41:51 -04:00
Clement Tsang 9a11e77aa0
feature: Adaptive network widget (#206)
Allows the network widget graph to grow/shrink with current data, rather than using a static size.
2020-08-28 16:30:24 -04:00
ClementTsang 81ec7c311b uptick: 0.4.7 2020-08-26 20:34:30 -04:00
Clement Tsang 7e8bf95179
uptick: 0.4.6 (#200) 2020-08-25 01:01:14 -04:00
ClementTsang 6dca970541 ci: switch to prepush rather than precommit 2020-08-23 21:43:24 -04:00
ClementTsang 691f6647e0 ci: set up clippy pre-hook 2020-08-23 21:39:53 -04:00
ClementTsang 005bd95f8a ci: Move wix output naming to Cargo 2020-08-23 21:22:34 -04:00
Clement Tsang 397a7e8467
ci: Add winget template generation (#199)
Adds winget CI generation.
2020-08-22 20:22:47 -04:00
Clement Tsang 7475f24a4e
feature: Add hook to properly clean up in the case of a kill call
Adds a hook to properly clean up the program in case the program gets SIGTERM'd.
2020-08-21 16:00:14 -04:00
Clement Tsang 1dc9346d3b
refactor: Remove ps calls
Removes and refactor ps calls that... should have not been there in the first place.
2020-08-21 01:33:12 -04:00
Clement Tsang 4b03b4b0b0
refactor: Refactor code, add new tests
Refactor code so we use a lib, allowing for easier testing. Adds additional tests for layouts.
2020-08-19 16:32:33 -04:00
Clement Tsang 3c373d7129
feature: Add appox. total mem as an option for processes and basic mem
Adds a way to display the memory value as a column in the processes widget and the basic memory widget, rather than just the percentage.
2020-08-17 15:41:37 -04:00
Clement Tsang 08e49b63c1
refactor: Revert tui upgrade to 0.10
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).
2020-08-16 04:25:59 -04:00
Clement Tsang f3897f0538
feature: Allow sorting by any column
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
2020-08-15 20:35:49 -04:00
Clement Tsang d0cc6078df
deps: Update dependencies, drop MSRV
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.
2020-08-11 20:22:39 -04:00
ClementTsang 4cc403b594 uptick: 0.4.5
This patch is just to deal with crates.io not using the correct
Cargo.lock I had intended.
2020-07-08 15:15:16 -04:00
ClementTsang d643ef7401 uptick: 0.4.4 2020-07-06 01:10:03 -04:00
ClementTsang 3d8a8b4e85 deps: update typed-builder to 0.6.0 2020-05-19 21:17:01 -04:00
Clement Tsang 12e4777d97
change: remove slash, change scroll behaviour on cpu
- 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
2020-05-16 22:38:19 -04:00
ClementTsang 2d9d10d8f9 uptick: 0.4.3 2020-05-15 00:00:02 -04:00
ClementTsang 2ae2ebd6d8 deps: update sysinfo 2020-05-14 22:22:29 -04:00
ClementTsang a03e9d6f31 uptick: 0.4.2 2020-05-11 22:53:56 -04:00
ClementTsang 56d6771d1b refactor: re-enable tui-rs linear interpolation 2020-05-10 17:01:45 -04:00
ClementTsang aea79a0750 uptick: 0.4.1 2020-05-05 17:50:30 -04:00
ClementTsang 1ff2606c90 update tests to deal with msrv 2020-05-04 18:23:34 -04:00
ClementTsang 6e81fbeebf change: more advanced searching and filtering 2020-05-02 16:01:07 -04:00
ClementTsang b87fde16ab uptick: 0.4.0 2020-04-29 00:10:27 -04:00
Clement Tsang 2faf3c6592
refactor: revert linear interpolation until tui fix comes 2020-04-28 16:44:10 -04:00
ClementTsang 24f5717125 cargo: switch to personal fork of tui-rs for now to deal with subtraction bug in lines 2020-04-26 20:18:29 -04:00
ClementTsang bc571588e4 refactor: Update tui to 0.9; refactor with new features 2020-04-18 18:05:41 -04:00
Clement Tsang 163f6823a2
feature: Add battery widget (#120) 2020-04-16 20:06:50 -04:00
dependabot-preview[bot] 28c27272d7
deps: sysinfo from 0.12.0 to 0.13.0 (#112) 2020-04-09 11:13:52 -04:00
Clement Tsang d2434bf8ad
uptick: 0.3.0 2020-04-07 21:07:24 -04:00
Clement Tsang 9127cb1468
refactor/bug: Array bound checking, fix CPU jump 2020-04-06 23:04:04 -04:00
Clement Tsang a40ddce84f
deps: Upgrade crossterm and sysinfo (#105) 2020-04-05 23:20:22 -04:00
Clement Tsang 0b1d84fdf5
Add modularity to widget placement and inclusion (#95) 2020-04-01 20:31:43 -04:00
dependabot-preview[bot] f44de81874
Update assert_cmd requirement from 0.12 to 1.0 (#94)
Updates the requirements on [assert_cmd](https://github.com/assert-rs/assert_cmd) to permit the latest version.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases)
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v0.12.0...v1.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-27 18:33:51 -04:00
Clement Tsang 1968bb14b4
Cleanup before modularity (#84)
* 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.
2020-03-13 01:07:24 -04:00
dependabot-preview[bot] 57fcd77d98
Update fern requirement from 0.5.9 to 0.6.0
Updates the requirements on [fern](https://github.com/daboross/fern) to permit the latest version.
- [Release notes](https://github.com/daboross/fern/releases)
- [Changelog](https://github.com/daboross/fern/blob/master/CHANGELOG.md)
- [Commits](https://github.com/daboross/fern/compare/fern-0.5.9...fern-0.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-10 10:40:44 +00:00
Clement Tsang 3a57570031
Cargo optimization (#65)
* Add potential cargo optimizations.

* Add potential cargo optimizations.
2020-03-05 02:23:19 -05:00
Clement Tsang 188858fedd
Formatting and typos (#63)
* 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.
2020-03-05 02:09:29 -05:00
ClementTsang 2f5b5e7269 Move windows to separate dependency. 2020-02-28 21:15:36 -05:00
ClementTsang 792be871e8 Uptick crossterm version. 2020-02-27 23:00:51 -05:00
ClementTsang a755a5d41c Switch to using unicode_segmentation's cursor as a basis on how we do cursor movement in search. 2020-02-27 16:10:33 -05:00
ClementTsang 67f8baa056 Fix unicode causing problems with search. 2020-02-27 16:10:33 -05:00