Skip to content

sysdata: streamline metric collection#2349

Open
lasers wants to merge 2 commits into
ultrabug:masterfrom
lasers:sysdata-update
Open

sysdata: streamline metric collection#2349
lasers wants to merge 2 commits into
ultrabug:masterfrom
lasers:sysdata-update

Conversation

@lasers

@lasers lasers commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Merge sysdata: drop legacy first #2348.


(qol cleanup) OK. I wanted to do this for some time... to move them into functions and keep updating with returned dicts in the loop, but codex says it's better to mutate everything instead... that way we don't have any really short-lived dict initialization and stuff like that. OK, we'll mutate.

I made minor change to arc_get_size... assuming that zfs, loaded on startup in /proc or not, will either stay there indefinitely or not. Users without zfs gets 0... and no zfs regex is needed because the line looks very easy to parse.

Moved lot of things to post_config_hook too so we can stick with minimal functions including optional last one max_used_percent.

In short, sysdata can be 1-20% faster than before compared to master. It is a wash with all placeholders. The expensive one is lm_sensors call for {cpu_temp} which I did not touch... mainly because we had various issues/prs wanting to fix {cpu_temp}.

  • (nolink to various cpu_temp issues/prs) https://github.com/ultrabug/py3status/pull/2029.

Benchmark.

branch             case         mean_seconds      vs_master
-----------------------------------------------------------
master             default       0.000094523       baseline
master             wide          0.003934389       baseline
sysdata-update     default       0.000081974  13.28% faster
sysdata-update     wide          0.003869354   1.65% faster

@lasers

lasers commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

@anarcat for potential zfs testing

@anarcat

anarcat commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

hey, i'm sorry but i can't test this as i don't run zfs on my desktop anymore and i don't even run py3status either. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants