summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
AgeCommit message (Collapse)Author
2023-05-25other: simplify termination/event loop logic (#1169)Clement Tsang
This just simplifies the logic around ctrl-c and termination logic and event loop logic to something simpler and without the need for timeouts and/or atomics. Instead, we just make termination an event sent by ctrl-c and use the same receiver for event handling to react to it and break the loop.
2023-05-24other: clean up thread event code (#1170)Clement Tsang
2023-04-15other: update default config generation to show cache (#1102)Clement Tsang
2023-04-12feature: add buffer and cache memory (#1063)Twan Stok
* First implementation of cache memory data collection, mostly copied from RAM and swap implementations * First implementation of cache memory display, copied from RAM and swap implementations. placed cache as second in the list as it is more similar to the RAM than any other item in the list * expanded comment to explain method. * rustfmt * all cache-related code excluded on windows, in the process refactored src/data_conversion.rs convert_mem_label() to convert a single label instead of all at once * better factoring-out of cache memory logic to allow individual disabling * added --enable_cache_memory flag, disabled cache memory collection by default * renamed CCH to CHE not sure how i messed that up * changelog updated * Added command line flag documentation * updated config file documentation * specified that buffer and cache memory display does not work on windows * resolved merge conflicts * added documentation to cache memory data collection * capitalized Windows * implemented missing canvas styling logic * fixed misplaced no-windows flag * reduced colour collisions, as cache colour was the same as the first GPU colour * made FIFTH_COLOUR constant windows-only * Revert "made FIFTH_COLOUR constant windows-only" This reverts commit 72698f1dd7e2de7dbda843708ece6a3dba66f94f. * made FIFTH_COLOUR constant non-windows-only * minor fix for basic mode row count * Update src/app/data_harvester/memory/sysinfo.rs Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> * Update src/canvas/widgets/mem_basic.rs Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> * updated default_config.toml * formatting --------- Co-authored-by: ClementTsang <34804052+ClementTsang@users.noreply.github.com>
2023-04-10refactor: migrate disk collection code off of heim, remove heim (#1064)Clement Tsang
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-05other: add clippy lints to deny todo and unimplemented (#1085)Clement Tsang
2023-03-27deps: bump sysinfo to 0.28 (#1078)Clement Tsang
* deps: update sysinfo to 0.28.0 * 0.28.1 * 0.28.2 * 0.28.3 * 0.28.4
2023-03-26refactor: unify on using bytes for the memory unit when harvesting (#1077)Clement Tsang
* refactor: unify on using bytes for the memory unit when harvesting * some ordering stuff that doesn't mean much * some comments * more fixes * refactor: rename * comments v2 * some more cleanup * remove uninlined_format_args allow
2023-03-15deps: switch back to crossterm 0.26.1 with fix to double keypress (#1068)Clement Tsang
2023-03-08other: deny missing safety docs and add them (#1053)Clement Tsang
2023-03-01other: switch to toml_edit (#1034)Clement Tsang
2023-02-20change: show process in tree if any ancestor or descendent matches (#1026)Clement Tsang
* 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-01-31other: replace deprecated `value_of` and `is_present` in clapspital
* Upgrade clap to 3.2.2 to allow future fix warnings * cargo fmt fix * Replaced deprecated `value_of` and `is_present`, builds with no warnings, clap 3.2.2 * cargo fmt * updated according to comments. builds fine, cargo test fine * Match some versions * Update Cargo.lock * Fix typo, mb --------- Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com>
2023-01-27other: ignore uninlined_format_args clippy lint for now (#1004)Clement Tsang
2023-01-20refactor: change name of some stuff, add some comments (#992)Clement Tsang
* some quick refactoring first * add todo for bug report template
2022-12-05other: add a redraw event on resize (#926)Clement Tsang
2022-11-29other: slightly reduce the CPU time spent for draws (#918)Clement Tsang
* 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-28refactor: move widgets out of the app folder nesting (#917)Clement Tsang
Moves the widget folder away from being nested in the app hierarchy.
2022-11-21other: non-normalized process CPU% cleanup and docs (#910)Clement Tsang
* refactor: simplify non-normalized code * update docs * appease clippy * add comment * unnormalized * fix issues on non-Linux regarding typos/imports
2022-11-21feature: per-core process cpu usage percentage (#899)database64128
2022-11-13other: remove flume (#893)Clement Tsang
In hindsight, pulling in flume is probably overkill and doesn't really help much.
2022-11-11other: remove the mouse throttler except for scroll events (#886)Clement Tsang
The throttler is only really needed for scrolls (e.g. free scroll wheels in Logitech mice), I don't really see it being needed in any other contexts. Moves/drag is another one I guess but we outright ignore those events right now.
2022-11-10refactor: run cargo +nightly fmt with group_imports (#885)Clement Tsang
* refactor: add some disabled unstable fmt options * run cargo +nightly fmt with group_imports * separate out the cfg-specific imports for clarity
2022-11-10other: try using flume for channel (#884)Clement Tsang
2022-11-10feature: search paste support (#881)Clement Tsang
* feature: add pasting to search Supports pasting events to the search bar (e.g. shift-insert, ctrl-shift-v). * update docs * clippy * comment * Update process.md * remove keyboard event throttle * fix issues with cjk/flag characters
2022-11-08deps: Update tui to 0.19.0 and crossterm to 0.25.0 (#878)Clement Tsang
* deps: update tui to 0.19 and crossterm to 0.25 * fix error * handle breaking changes
2022-11-06ci: add cache clearing to PR merges (#874)Clement Tsang
* ci: add cache clearing to PR merges * some renaming * small change to force cache * add manual run option
2022-11-06feature: basic sortable disk (#870)Clement Tsang
2022-11-05feature: basic sortable temp (#868)Clement Tsang
* feature: basic sortable temp * add shortcuts * fix missing shortcut names in header * update changelog * update docs
2022-11-02refactor: move data passing for table to another step (#863)Clement Tsang
* refactor: remove redundant scroll direction enum This was made redundant from the table refactor. * add some todos/docs * refactor: temp hack to pass in data on process
2022-10-15feature: add gpu ram collector for nvidia feature flag (#794)Justin Martin
* add gpu ram collector for nvidia feature flag * add row for TX in basic layout * size gpu point_vec * use vec for mem basic widget drawing * remove to_owned * code review: change mem tuple to struct with cfg fields, rename mem_basic ratio and use vec macro for layout * build on freebsd
2022-10-12refactor: tables V2 (#749)Clement Tsang
* refactor: move to new data table implementation * more work towards refactor * move disk and temp over, fix longstanding bug with disk and temp if removing the last value and selected * work towards porting over CPU work towards porting over CPU fix typo partially port over cpu, fix some potentially inefficient concat_string calls more work towards cpu widget migration some refactoring * sortable data sortable data more refactoring some sort refactoring more refactoringgggg column refactoring renaming and reorganizing more refactoring regarding column logic add sort arrows again * move over sort menu * port over process port over process precommit temp temp two, remember to squash work fix broken ltr calculation and CPU hiding add back row styling temp fix a bunch of issues, get proc working more fixes around click fix frozen issues * fix dd process killing * revert some of the persistent config changes from #257 * fix colouring for trees * fix missing entries in tree * keep columns if there is no data * add and remove tests * Fix ellipsis
2022-08-22feature: Add zfs feature flag for arc memory (#784)Justin Martin
* freebsd clippy * add arc support * Code Review: moved runtime cfg checks to compile time and formatting * remove compile platform checks * add zfs feature flag to get_arc_data
2022-08-14Feature: half page scrolling (#774)ViridiCanis
* add ctrl-u/ctrl-d to process table * add help text for ctrl-u/ctrl-d * add ctrl-u/ctrl-d to help dialog * store height of help menu, fix overscroll with half page down on help menu Co-authored-by: ClementTsang <34804052+ClementTsang@users.noreply.github.com>
2022-06-29feature: add note on how to exit if running in non-terminal (#761)Clement Tsang
Addition to #760, adds an extra message so users know how to exit in this scenario.
2022-06-28feature: add check for whether the output is to a terminal (#760)Clement Tsang
Adds a warning if the user is calling bottom from an environment where the output is not a terminal.
2022-06-14docs: re-enable lib docs for development purposes (#750)Clement Tsang
Enables lib docs, primarily intended for dev use. Also change some existing documentation based on warnings (mainly broken/bare links).
2022-06-03refactoring: Move around components and state (#746)Clement Tsang
A small refactor to move some state/component files around in terms of file structure and code location. Should have no effect on logic.
2022-05-16bug: fix a variety of bugsClementTsang
Bugs squashed: - Incorrect column sizing for flex cases - Case where the sort menu bounds were still existing despite being hidden - Proc widget not actually taking into account the calculated row widths in some cases during data conversion.
2022-05-15bug: fix issues with macos and windows during refactorClementTsang
2022-05-15refactor: more work towards unifying process codeClementTsang
A bunch of work towards also refactoring how the process widget gathers and converts data.
2022-05-15refactor: begin migration of process widgetClementTsang
2022-05-07refactor: remove unneeded freeze paramClementTsang
2022-04-28bug: fix choosing an out of list bounds selecting the last entry (#717)Clement Tsang
This is a simple bug fix that changes the behaviour of a scroll select (and column select) to only update if the updated position is _within_ the bounds of the list (0 to the max index, inclusive). Prior to this, all the implementations but the disk implementation would just bound the change. This was both inconsistent with the disk scroll state, but also jarring since this meant a user could click on seemingly empty space but it would somehow click on the very last entry. This change also unifies the scroll calculation function between all the scroll select functions. Ideally we get rid of the intermediary functions but that might require more refactoring than I want for this fairly simple bug fix. The column select scroll calculation was also changed to fit this behaviour, but it does not use the same logic as the other scroll states. What could be done in the future is a generic implementation for direction (or maybe just "increment vs. decrement") to share it all.
2022-03-07other: fix clippy lints on vector reference params (#689)Clement Tsang
Fixes a few clippy lints around function parameters and using slices over vector references.
2021-12-27feature: add basic page up/down scrolling (#646)Clement Tsang
Adds page up/down scrolling support to respectively scroll up/down by a full page. Note that this is mostly just to get the feature out for those interested, and is admittedly a bit rushed - I will be rewriting all logic involving event handling as part of state refactor anyways, so this will also get changed in the work done there, and therefore, I kinda just sped through this.
2021-07-31other: Add RISC-V to unofficially supported targets (#565)Clement Tsang
Adds CI actions and documentation for RISC-V.
2021-06-22feature: add F9 as an alternative process kill key (#518)Clement Tsang
Adds F9 as an alternative kill shortcut to dd.
2021-06-06deps: Switch back from dirs-next to dirs (#492)Clement Tsang
Since it's supported again, seems like a good time to switch back to dirs.
2021-05-23refactor: remove old traces (#486)Clement Tsang
Removes some old trace lines for cleanup