Commit Graph

45 Commits

Author SHA1 Message Date
Clement Tsang 3a8d85d487 refactor: use macros for initializing canvas styles (#1149)
* refactor: use macros for initializing canvas styles

* add quotes

* Simplify macro

* update tests

* more renaming
2023-05-13 05:22:09 -04:00
Clement Tsang dae65bcd56 bug: fix certain custom column combinations causing issues (#1140)
* docs: update some docs related to processes

* bug: temp bandaid on column feature to avoid dupes issue
2023-05-09 19:20:34 -04:00
Yuxuan Shui 80183b8b1c feature: show running time of processes (#801)
* feature: show running time of processes

* fix clippy

* add time searching

* update changelog

* use safer duration for linux in case of 0

* some cleanup

* quick hack to deal with some Windows processes returning unix epoch time as start time

---------

Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com>
2023-05-02 01:33:53 -04:00
Clement Tsang 605314d44c feature: add customizable process columns (#1115)
* feature: add customizable process columns

* Add some tests and actual logic

* more tests

* update changelog

* update config field

* even more tests

* update documentation

* more testing
2023-04-29 19:21:48 -04:00
Clement Tsang 109498c1db deps: remove const_format dependency (#1114)
* deps: remove const_format dependency

I was importing it for just one use case, but I could just define the
const string manually and not pull it in at all.

* update husky entry
2023-04-23 00:53:21 -04:00
Clement Tsang e61e5f2af6 deps: Switch to using hashbrown for general hashmap usage (#1092)
* deps: replace fxhash with hashbrown + ahash

* replace std hashmap with hashbrown + ahash

* fmt

* some more fmt
2023-04-12 00:03:27 -04:00
Clement Tsang 9edde9b133 refactor: migrate disk collection code off of heim, remove heim (#1064)
Migrates existing heim-based disk data collection code off of it to either sysinfo or vendored code based on heim/sysinfo/other sources. This also allows us to remove heim completely from bottom.

---

* refactor: fix some refresh code

* remove async from the freebsd code

* some file/implementation organization

Turns out sysinfo lacks a lot of data I need. I can still use it for the
Windows disk usage implementation, but I'm probably going to manually
implement macos/linux usage and all io usage stats.

* more restructuring

* Some other fixes

* remove futures

* ready for some big changes?

* big changes

* linux io + reads

* use lossy conversion for mount point

* add windows refresh

* so long heim, and thanks for all the fish

* fix filter behaviour, remove string allocation when reading lines

* rename unix -> system for more accurate file struct representation

* fix freebsd

* port generic unix partition code

* add bindings and fix errors

* finish macOS bindings for I/O

* disable conform check, this seems to... make disk I/O work on macOS?????

* fix linux

* add safety comments

* more comments

* update changelog

* changelog

* We're going full 0.9.0 for this

* update lock

* fix some typing

* bleh

* some file management

* hoist out get_disk_usage

* fix some stuff for Windows

* typing and remove dead code allow lint

* unify typing

* fix

* fix 2

* macOS fix

* Add bindings file for windows

* add windows implementation

* fix macos
2023-04-10 05:52:46 -04:00
Clement Tsang cabc594279 refactor: clean up some options code (#1029)
* remove some dead code

* use macros to help clean up clutter for binary flags

* add test

* group

* fix using gpu feature
2023-02-25 04:24:38 -05:00
Clement Tsang f1f07945f6 change: show process in tree if any ancestor or descendent matches (#1026)
* refactor: optimize kept list in tree to just store filtered values in a set

* change: show all direct children of a tree process children if the parent matches

* change: show process in tree if any ancestor or descendent matches
2023-02-20 00:15:16 -05:00
Clement Tsang edc61d428c bug: fix selected text bg colour being wrong if only the fg colour was set (#1021)
* rename file to be more generic

* fix selected text BG colour being wrong by default

* update changelog

* add test for bug
2023-02-18 00:51:13 -05:00
Michael Bikovitsky d956f336a9 feature: Add support for displaying process usernames on Windows (#1016) 2023-02-10 15:01:37 -05:00
Clement Tsang 4870ff365a refactor: change name of some stuff, add some comments (#992)
* some quick refactoring first

* add todo for bug report template
2023-01-20 00:08:02 -05:00
Clement Tsang 22e386a38c other: re-enable disk usage split, update help menu (#963)
* Revert "other: revert disk usage change for now (#962)"

This reverts commit d3661c2320.

* some cleanup

* update help menu

* update screenshot

* update changelog wording

* Remove redundant newlines

* Use type system to ensure help constants match in size
2023-01-19 05:40:34 -05:00
Clement Tsang d3661c2320 other: revert disk usage change for now (#962)
This is a temp change, this commit will be reverted after 0.7.1 comes out.
2023-01-05 23:22:45 -05:00
Clement Tsang 8f9097b90c bug: fix CPU 'all' label missing on small sizes (#953)
Fixes the "All" label being missing on small windows.
2023-01-04 01:55:46 -05:00
Clement Tsang a56e7f6cc9 feature: split usage into usage percentage and value (#950)
Denotes both usage and usage percentage. This also redoes the calculation for percentage to be based on the sum of avail + used, rather than on total, as otherwise we get potentially confusing percentages.
2023-01-01 05:08:04 -05:00
Clement Tsang b7bf57481f docs: update demo to 0.7.0 (#941)
* docs: update demo to 0.7.0

* update again
2022-12-31 20:47:33 -05:00
Clement Tsang 3b5774117f bug: fix search scrolling with wider Unicode characters. (#938)
This should help make search scrolling more reliable larger Unicode characters like CJK/flag characters.
2022-12-31 05:51:59 -05:00
Clement Tsang ac5e2ce4a2 bug: fix incorrect text width calculation (#925)
* bug: fix incorrect text calculation

* actual fix, add tests

* appease clippy

* add link to inspiration
2022-12-05 04:21:37 -05:00
Clement Tsang 9c3e60e74f other: slightly reduce the CPU time spent for draws (#918)
* other: group all dataset draws in a time chart

We used to draw each data set separately as a new canvas. Now, in one
canvas, we draw all datasets.

Note that this changes how dataset  lines are drawn - rather than
drawing one on top of another, it now draws kinda all at once. This
effect is *kinda* a bit better IMO, but it might also look a bit
more cluttered.

* other: optimize truncate_text

Flamegraphs showed that this area seems to be a bit heavy at times with
some inefficient use of iterators and collection. This change should
hopefully optimize this a bit by reducing some collections or
reallocations.

There can also be some further optimizations with less allocations from
callers.

* Reduce some redundant draws
2022-11-29 03:53:58 -05:00
Clement Tsang 913c9ed5c6 refactor: move widgets out of the app folder nesting (#917)
Moves the widget folder away from being nested in the app hierarchy.
2022-11-28 00:26:58 -05:00
ClementTsang 50d3be05dd More refactoring. 2019-09-11 20:41:11 -04:00
ClementTsang b7081dd0e4 Hopefully made a much better process CPU tracker... this matchs top pretty closely, within +/- 5% 2019-09-11 17:22:56 -04:00
ClementTsang 2032660230 Rudimentary charting for cpu and mem. 2019-09-11 00:52:51 -04:00
ClementTsang 0d76c49973 Added stale data filtering. 2019-09-11 00:08:55 -04:00
ClementTsang ac26ac7f5a Re-added timing, refactored. 2019-09-10 23:37:20 -04:00
ClementTsang 9740fe2298 Fixed memory issue. 2019-09-10 19:10:29 -04:00
ClementTsang 939e2d1d77 Tried to fix process cpu usage... and reduce total cpu usage of program. 2019-09-10 18:22:34 -04:00
ClementTsang 8c7b9dab35 I can't spell. 2019-09-09 19:31:03 -04:00
ClementTsang d9a0d32c1f Ironed out as many kinks as possible in terms of smoothness. 2019-09-09 18:34:13 -04:00
ClementTsang ff89f1187f Began working on populating fields. 2019-09-09 00:09:58 -04:00
ClementTsang 471209f511 Refactored code such that it fits more of tui-rs' example. 2019-09-08 19:56:23 -04:00
ClementTsang 0050b77caf Removed the 'timing' aspect, it was irrelevant. 2019-09-08 01:01:42 -04:00
ClementTsang 826bc701c1 Added 'used' field in disks polling, as it is more accurate 2019-09-07 23:34:29 -04:00
ClementTsang ef2dc7e1b5 Added better error handling. 2019-09-07 23:29:30 -04:00
ClementTsang 8da38c061d Finished network polling. 2019-09-07 22:41:52 -04:00
ClementTsang ac85c42ce9 Added temperature support for data polling. 2019-09-07 22:30:15 -04:00
ClementTsang 521698a2bd Added memory data checking. 2019-09-07 19:03:18 -04:00
ClementTsang ace6a4bc68 Got processing switched to heim 2019-09-07 18:45:44 -04:00
ClementTsang f9b98c71ec Set up disk to use heim 2019-09-07 16:39:17 -04:00
ClementTsang 153a2590b0 Started using heim. Not working yet. 2019-09-07 00:49:15 -04:00
ClementTsang 020fb83645 Mostly gotten cpu widget done. 2019-09-06 22:46:44 -04:00
ClementTsang 832d32700e Added interval, disk tracking. 2019-09-06 00:05:50 -04:00
ClementTsang 243742de2a Got the basics of process sorting done. 2019-09-05 18:28:54 -04:00
ClementTsang c8bbf5850c Set up more file hierarchy. 2019-09-04 23:45:19 -04:00