Commit Graph

44 Commits

Author SHA1 Message Date
Clement Tsang f7d070f944 refactor: somewhat migrate to Rust 2024 edition (#1681)
* refactor: try bumping to rust 2024 edition

* now run nightly fmt

* fix some macos changes

* only apply a few of these settings
2025-02-22 02:12:08 +00:00
Clement Tsang 837e23560f refactor: points rework (v1) (#1663)
* refactor: add new method of storing timeseries data

* mostly finish adding data

* tmp

* migrate over to separate lib

* prepare to migrate over to new timeseries storage

* prepare to migrate frozen state

* migrate frozen state

* name

* migrate data collection

* migrate network

* fix some stuff

* fix a panic from bad pruning

* Fix pruning issues

* migrate RAM

* migrate swap

* migrate cache label

* refactor out to function

* migrate ram points

* migrate swap points

* migrate cache points

* migrate arc

* migrate gpu, remove a bunch of state code around force update

* rename cache, also some comments

* some temp cleanup

* migrate disk

* comments to remind me above fixmes, fix bug around time graph spans

* migrate load avg

* port temps

* style

* fix bug wiwth left edge gap

* partial migration of cpu, reorganize data file structure

* migrate cpu

* some cleanup

* fix bug with cpu widget + clippy

* start some small optimization work

* fix some things for some platforms

* refactor: rename data_collection to collection

* refactor: only process temp type in data eat step

* flatten components folder a bit

* partially migrate to new graph system and fix cpu bug

* driveby migration of process list to reduce allocs + more migration of points drawing

* revert the collection change

Forgot that I cut a new `Data` on each collection so that change was
useless.

* port over network stuff...

* fully migrate network, and fix some log bugs while we're at it

This is something I never noticed, but the log of 0 is inf - so there
were gaps in the lines when using log scaling!

* fix cpu colour in all mode

* clean up some disk table stuff
2025-02-03 06:34:58 +00:00
Clement Tsang 29029b86fb refactor: remove BottomError (#1498)
* refactor: remove BottomError

* remove thiserror

* some cleanup

* forgot to remove this
2024-07-22 07:30:03 +00:00
Clement Tsang c56e28328e refactor: convert more errors over (#1496)
* refactor: remove From<String> for BottomError

* fix kill_process
2024-07-19 23:52:13 -04:00
Clement Tsang 982b7181a6 change: change how disk, temp, and net filters in config are set (#1481)
* change: change how disk, temp, and net filters in config are set

* run rustfmt

* update default config
2024-06-16 02:15:36 -04:00
Clement Tsang 8885910442 refactor: remove lib and move some things around (#1477)
A loooooong time ago (wow, it's been 4 years apparently...), I made the brilliant (/s) decision to use both lib.rs and main.rs because I was trying to add tests in the tests folder that needed private access to some functions in the src - and at the time, the only way I could think of doing so was exposing bottom as a library and a binary.

This isn't necessarily bad, but for my use case, it's pretty unnecessary nowadays (since I've moved all my tests back into the source files) and adds complexity in looking for certain things, so it's high time we move things around and remove lib.rs. I also took the time to clean up some weird code I spotted along the way.
2024-06-05 06:00:21 +00:00
Yuri Astrakhan 5eb4fbde5d chore: fix certain uninlined string format uses (#1310)
* Fixed uninlined args

First ran this, and fixed a few more similar issues by hand

```
cargo clippy --workspace --fix --benches --tests --bins -- -A clippy::all -W clippy::uninlined_format_args
```

Note that in a few cases, format args were passed by ref - which is actually a tiny perf hit - compiler would not be able to optimize them.

* revert change here

since it contains a non-inlineable variable I'm not a fan of using it partially here

* revert

given the other formats above/below I would prefer keeping it like this

---------

Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com>
2023-11-15 03:47:22 -05:00
Clement Tsang ac55add21e deps: bump windows to 0.51.1 (#1279)
* deps: bump windows to 0.51.1

* some changes to fit new API
2023-08-22 17:27:36 -04:00
Clement Tsang a10b91239b bug: missing windows syscall to close the handle on drop when killing (#1245)
* bug: missing windows syscall to close the handle on drop when killing

* changelog

* fix
2023-07-05 01:40:12 -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 10d7226b19 other: deny missing safety docs and add them (#1053) 2023-03-08 00:00:50 -05:00
Clement Tsang 639c93b4c8 other: switch to windows-rs for process killing (#985) 2023-01-18 01:43:08 -05:00
Clement Tsang 32da5f39bb bug: fix dot marker setting not being considered (#934)
* bug: fixes marker settings being ignored while rendering time charts

* appease clippy
2022-12-27 06:37:47 -05:00
Clement Tsang fb7b1226fd feature: add nord and nord-light colours (#406)
Adds colour schemes for Nord, along with a light variant.
2021-02-15 14:12:43 -05:00
Lukas Rysavy 120da2c85a feature: Fine grained kill signals on unix (#263)
* feature: added signal selection for killing in unix

* feature: set default signal to 15 (TERM)

* feature: selecting kill signal number with number keys

* feature: mouse selection of kill signals

* fix: restore working previous kill dialog for win

* bug: more fixes for killing on windows

* feature: made two digit number selection only work in time window

* feature: replaced grid with scrollable list for kill signal selection

* fix: handling scrolling myself

* chore: replaced tui list with span
so we actually know for sure where the buttons are

* feature: always display cancel button in kill signal selection

* chore: simplified as suggested in review

* fix: made scrolling in kill list more intuitive

* fix: differentiating macos from linux signals

* fix: fixed reversed kill confirmation movement

* chore: fixed unused warnings for windows

* feature: added G and gg keybindings for kill signal list
2020-12-15 21:39:17 -05: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 c82f4d40b4 feature: Support memb (mem bytes) searching in processes
Supports searching by the new mem value.
2020-08-21 22:59:49 -04:00
Clement Tsang ff15649be7 refactor: remove kill command, use libc
Removes the kill command call and instead uses libc to manage killing processes.
2020-08-21 18:16:37 -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 0b1d84fdf5 Add modularity to widget placement and inclusion (#95) 2020-04-01 20:31:43 -04:00
Clement Tsang 01b37368b2 More basic cleaning (#74)
* Add htop link.

* Move dd and help dialog into separate files

* Move to  folder

* Properly show error message if DD fails on macOS and linux.
2020-03-08 13:56:18 -04:00
ClementTsang 4c98fe4fde Refactoring. 2020-03-02 00:09:45 -05:00
ClementTsang eb2622467f Refactoring. 2020-03-02 00:09:45 -05:00
ClementTsang 75a1934420 rustfmt 2020-02-28 22:27:35 -05:00
ClementTsang bbdd7786ce Optimized imports as per clion 2020-02-28 22:24:24 -05:00
ClementTsang 4ac3a10fbf Update and clean up ? menu... some more work to be done though 2020-02-08 22:38:55 -05:00
ClementTsang 24f0bbc852 dd works on macOS now. 2020-01-30 23:13:12 -05:00
ClementTsang 0f2b4a7ba5 Formatting changes to be a bit more strict on line length 2020-01-07 23:40:53 -05:00
ClementTsang ad190a144d Some basic cleaning 2020-01-06 23:07:58 -05:00
ClementTsang 8cc8b47c89 Some documentation changes 2020-01-02 23:42:44 -05:00
ClementTsang f6eb2d6e54 Fix problem on windows with dd 2020-01-02 00:31:34 -05:00
ClementTsang b22c07aba2 Added dialog for dd, added error message if fail to dd, cleaned up some stuff 2020-01-01 23:39:47 -05:00
ClementTsang 7208908413 [skip travis] Add check to prevent improper dd while on another panel 2020-01-01 18:39:59 -05:00
Clement Tsang 98ccc70743 Fix processes in windows 2019-12-29 21:40:22 -05:00
ClementTsang bf02afcf79 Add g and GG logic 2019-12-25 23:31:18 -05:00
ClementTsang baf588be8a Redid some of the networking portion, changed cargo a bit, some refactoring 2019-12-25 23:02:21 -05:00
Clement Tsang 4974ae0886 Some simple fixes to abide by clippy 2019-12-22 17:37:07 -05:00
ClementTsang e7477ce517 Update tui version... legends aren't showing up yet, will have to fork again. 2019-12-06 00:57:04 -05:00
ClementTsang 5ecc80e2ad Fix for divide by zero if swap/mem was 0 2019-09-25 02:13:10 -04:00
ClementTsang 12deeb9c46 Fixed linux issue. 2019-09-25 02:00:25 -04:00
Clement Tsang 52c4234ed0 Added dd for windows. 2019-09-25 02:00:10 -04:00
ClementTsang db06f8201f Potential fix for windows processes. 2019-09-17 00:24:36 -04:00
ClementTsang 0550402698 Added dd command on linux. 2019-09-16 21:45:48 -04:00
ClementTsang 266c281024 Modified errors in data_collection portion to use the newer error type added earlier on. 2019-09-16 19:05:44 -04:00