Commit graph

91 commits

Author SHA1 Message Date
0e770da264 chore: tag 0.4.10
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a2158a305d5f249b52c8b21dc5aaca86a6a6964
2025-11-17 17:42:15 +03:00
2a6fe2a3f1
treewide: set up Hotpath for benchmarking individual allocations
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I0351e5753996e6d0391fc9e2f329878a6a6a6964
2025-11-17 17:40:46 +03:00
9bd4c9a70a
treewide: format with nightly rustfmt rules
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ib8502372dafe2e970024f606b44825af6a6a6964
2025-11-17 16:20:43 +03:00
af8031f9ec
meta: selectively enable Clippy lint-groups projectwide
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ic6eedd28e1ad48a67c988607dd45d7686a6a6964
2025-11-17 16:20:42 +03:00
4c22cf5d2a
nix: use nightly rustfmt; add taplo
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ie4a1b5a29166931aac006a44874374346a6a6964
2025-11-17 16:20:41 +03:00
d438800738
nix: streamline source filter; move RUSTFLAGS to env attrs
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I9761b908d05efd7dc10d53c54ca80fb26a6a6964
2025-11-17 16:20:40 +03:00
1d69d3107c
microfetch: trim fetch screen by one space
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I200c72b5a8249ed3d23754aa3f01aea86a6a6964
2025-11-17 16:20:39 +03:00
dab8f556af
meta: set up formatters for Rust and TOML
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I917d66d2af199b96f84aa50071a0ccd56a6a6964
2025-11-17 16:20:38 +03:00
6150e55ba5
flake: bump nixpkgs
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6ba6412f88305b295ffb571313606bd56a6a6964
2025-11-17 16:20:37 +03:00
8800b69ef3
chore: bump dependencies
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69647ad9cfdd52eec7fa9ae4a184b9c8ea0d
2025-11-17 16:20:36 +03:00
e355ddc517
flake: bump nixpkgs
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ica041259225e45e345de08325a0cc75f6a6a6964
2025-11-17 16:20:35 +03:00
9d8905354e
expand comment strings
Some checks failed
Rust / build (push) Has been cancelled
80 chars is good.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a696460754266ff5810a73f98ce9e6eb0c35b
2025-08-04 21:04:32 +03:00
14d8f9390d
chore: bump criterion
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964e55c9925511d83d6be9b2ba001613983
2025-08-04 21:04:31 +03:00
7da5fe97cc
nix: point to nixos-unstable for the nixpkgs input
Oops.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964eab43b655668d65abe532ed710538670
2025-08-04 21:04:30 +03:00
bc03fd73a0
0.4.9
Some checks failed
Rust / build (push) Has been cancelled
2025-06-22 03:11:45 +03:00
f20f1e33eb
chore: bump dependencies 2025-06-22 03:04:40 +03:00
61d4b7377f
colors: remove lazy_static dependency and use LazyLock for COLORS 2025-06-22 02:53:21 +03:00
f7d7c73073
chore: bump nix crate; 0.4.8
Some checks failed
Rust / build (push) Has been cancelled
2025-05-02 12:50:41 +03:00
raf
28e156b9a7
Merge pull request #17 from ErrorNoInternet/main
treewide: clean up a few things
2025-05-02 09:49:13 +00:00
ErrorNoInternet
b814b2bacf
refactor: return write error 2025-04-15 03:46:16 -04:00
ErrorNoInternet
0233cdc0fc
perf: use MaybeUninit for libc buffers 2025-04-15 03:46:16 -04:00
ErrorNoInternet
88c9ff5e13
perf: don't collect args into a Vec 2025-04-15 03:46:16 -04:00
ErrorNoInternet
9713138e94
perf: pre-allocate strings 2025-04-15 03:46:15 -04:00
ErrorNoInternet
c139026704
refactor: clean up a few things
I've decided to keep lazy_static for now as std::sync::LazyLock seems to
have a slightly bigger impact on binary size.
2025-04-15 03:46:15 -04:00
raf
671ce6b8e5
Merge pull request #16 from NotAShelf/no-nix
Some checks failed
Rust / build (push) Has been cancelled
uptime: get rid of nix crate
2025-04-10 05:15:11 +00:00
8df950d340
bump deps; add libc crate 2025-04-10 08:12:19 +03:00
e9aa9a2bbe
uptime: get rid of nix crate 2025-03-30 22:33:16 +03:00
a3b87f8f83
flake: bump nixpkgs
Some checks failed
Rust / build (push) Has been cancelled
2025-03-30 21:48:46 +03:00
9c897b5960
nix: enable parallel building; clean up devshell
Some checks failed
Rust / build (push) Has been cancelled
2025-01-26 01:24:16 +03:00
774442eb63
0.4.6
Some checks failed
Rust / build (push) Has been cancelled
2025-01-26 01:08:44 +03:00
d0f88b179c
further optimize uptime retrival
Try and minimize expensive operations (e.g., divisions and allocations) to hopefully get a
*consistent* measurable performance improvement. In my testing this brings the get_current
function duration from > 1.2600 µs to < 1.2400 µs.
2025-01-26 01:06:02 +03:00
592fb58474
get rid of color_eyre
Should never have added it. Annoyingly long compile times for no reason...
2025-01-26 00:57:02 +03:00
SomeEmptyBox
4fff13a51f
Update memory icon (#15)
Some checks failed
Rust / build (push) Has been cancelled
Makes memory icon bigger by using CPU icon from Nerdfonts instead of the memory icon.
2024-12-19 17:02:32 +00:00
ea8280ef77
docs: update benchmarks to reflect recent improvements
Faster and faster we go.
2024-12-19 20:00:37 +03:00
4b7836d572
append newline to write_all output
Fixes a small bug that resulted in terminal artifacts. My bad, gang.
2024-12-19 19:13:16 +03:00
c97fa33aec
0.4.3
Moar speed, NO_COLOR support
2024-12-19 18:47:04 +03:00
fd18e9d244
release: conditionally improve performance for get_os_pretty_name
It is difficult to get completely accurate benchmarks, given how small
the numbers we are dealing with are, but this seems to point at an
overall trend of *slightly* faster execution. The change minimizes
unnecessary memory allocations and string manipulations, to help ensure
more performant line reading and immediate return upon finding the
PRETTY_NAME without additional, redundant operations.
2024-12-19 18:30:33 +03:00
e19abcedae
docs: update readme; mention NO_COLOR changes 2024-12-19 18:14:23 +03:00
a96effb875
bump version 2024-12-19 18:14:15 +03:00
065216af7c
colors: respect NO_COLOR spec
Microfetch will now respect the NO_COLOR environment variable if it has
been passed to the program. The performance overhead of this operation
is almost none. In addition, the main function has been updated to lock
stdout.
2024-12-19 17:21:56 +03:00
1b0d15a24f
docs: mention nerdfonts requirement; update benchmarks section
Some checks failed
Rust / build (push) Has been cancelled
2024-12-10 21:26:14 +03:00
3960b37089
faster release parsing
Some checks are pending
Rust / build (push) Waiting to run
Around 20% faster when you think about it, but results vary because of hardware race conditions.
2024-12-09 17:30:57 +03:00
raf
8f5bfcbd05
implement --version for checking program version (#10)
Some checks failed
Rust / build (push) Has been cancelled
2024-10-29 16:45:55 +00:00
9ed9e8d930
increment cargo version
Some checks failed
Rust / build (push) Has been cancelled
2024-08-17 21:14:09 +03:00
64ac7a6ef3
provide a microfetch package
Some checks failed
Rust / build (push) Has been cancelled
...and alias default package to it. I like this convention better
2024-08-15 21:07:58 +03:00
19672445a2
improve credits section; reorganize README 2024-08-15 21:07:40 +03:00
3bb2a0bd10
update demo again, again
Some checks are pending
Rust / build (push) Waiting to run
Use a better resolution, strip, use new RAM calculation
2024-08-15 20:45:46 +03:00
vali
f1e8ca8773
add benchmarking for individual functions (#9)
* add benchmarking

* update README to include benchmarking of individual functions

* README: formatting

* README: add link to Criterion's getting_started

* shell.nix: add gnuplot

Since Criterion.rs uses gnuplot to generate nice plots, add it to the
shell.

* Cargo.toml: fixed microfetch binary name

* benchmark.rs: fix benchmark function's name

* Update README.md

---------

Co-authored-by: raf <raf@notashelf.dev>
2024-08-15 17:43:39 +00:00
Ryan
907112f2d1
micro optimizations (#8)
* perf: break early after parsing required meminfo

Also a match statement for compiler magic.

* perf: pre-allocate strings when reading files

* refactor: remove duplicate .to_string()

* perf: try to print everything in one syscall

println! sends a syscall for each line.

* perf: get rid of duplicate uname syscall

* perf: simplify first letter capitalization

* refactor: directly use key in match statement
2024-08-15 10:32:02 +00:00
cb9703f820
update demo image
Some checks are pending
Rust / build (push) Waiting to run
Also optimizes, and removes all metadata from the demo image.
2024-08-15 11:33:01 +03:00