Commit graph

59 commits

Author SHA1 Message Date
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
9a408c0da9
add thanks section to readme 2024-08-15 11:23:53 +03:00
Ryan
1cf4f754ac
parse /proc/meminfo for memory usage (#7)
* fix: calculate memory usage via /proc/meminfo

* refactor: move sysinfo call into get_current

No longer used by anything but uptime.
2024-08-15 08:14:27 +00:00
vali
4d509839f5
pass sysinfo to system.rs and uptime.rs (#6)
Some checks are pending
Rust / build (push) Waiting to run
2024-08-15 00:29:57 +00:00
cd8ddc2177
increment cargo version
Some checks are pending
Rust / build (push) Waiting to run
2024-08-14 00:23:08 +03:00
b792d41fcc
capitalize first letter of session type
wayland -> Wayland, x11 -> X11
2024-08-14 00:20:03 +03:00
6cad15c330
include installation instructions 2024-08-14 00:19:40 +03:00
sioodmy
58c6d9b384
docs: update readme (#5) 2024-08-13 21:14:38 +00:00
e90de78b61
increment cargo version 2024-08-14 00:00:11 +03:00
Sora
ae76a0cbe1
refactor: remove some redundant error types (#4) 2024-08-13 20:59:11 +00:00
927f6077b4
store printed fields in a struct
Some checks failed
Rust / build (push) Has been cancelled
Shut up, clippy.
2024-08-05 11:33:42 +03:00
Ryan
13903539b7
perf: use nix::sys::utsname::uname for less syscalls (#2)
Instead of reading multiple files to get the `sysname`, `release`, and
`machine` name, use the `nix::sys::utsname::uname` function which sends a
single uname syscall instead. This increases performance and portability.

From my observations, there are ~10 less syscalls.
2024-08-05 08:08:25 +00:00
17152f9d14
include comperative benchmarking results
Some checks are pending
Rust / build (push) Waiting to run
2024-08-05 03:57:43 +03:00
52d9a479cf
additional nix tooling 2024-08-05 03:48:51 +03:00
1ced9b4527
increment cargo version 2024-08-05 02:19:19 +03:00
7de3f27642
nix: build with llvm.stdenv; use mold linker 2024-08-05 02:04:23 +03:00
5c335d179e
isolate build profiles; optimize dev 2024-08-05 02:02:58 +03:00
7bed1f583b
use color_eyre::Result in most functions 2024-08-05 01:37:32 +03:00
0fb8fbaae6
receive uptime from nix crate 2024-08-05 01:37:13 +03:00
2ecf9303fa
update Cargo.lock
Some checks are pending
Rust / build (push) Waiting to run
How the hell did I miss this?
2024-08-05 01:04:38 +03:00
7d693ea26f
include benchmarks, add contributing section 2024-08-05 00:57:07 +03:00
72d3130aa0
clean up get_desktop_info; increment minor version 2024-08-04 22:04:23 +03:00
482ffe96cd
increment version 2024-08-04 17:21:08 +03:00
cf0a52150c
minify and optimize uptime reader 2024-08-04 17:20:34 +03:00
e3112dba1d
trim shell name to omit store path 2024-08-04 17:18:27 +03:00
fc62d72cab
add demo to README
Some checks are pending
Rust / build (push) Waiting to run
2024-08-04 16:35:16 +03:00
c2deeb38a4
increment version 2024-08-04 13:08:48 +03:00
a44db5e5f3
shell name & colors in output 2024-08-04 13:07:27 +03:00
81cdc0a281
speeding it up 2024-08-04 12:44:19 +03:00
mewoocat
ef2f6dc56e
Better logo (#1) 2024-08-04 09:42:53 +00:00
f0809ce877
nix package
Some checks are pending
Rust / build (push) Waiting to run
2024-08-04 01:14:17 +03:00
158f4810c8
bump cargo version 2024-08-04 00:42:58 +03:00
cff4332122
clippy lints 2024-08-04 00:12:07 +03:00