Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add zfs io counters for linux and freebsd #1248

Merged
merged 4 commits into from
Jul 9, 2023

Conversation

jamartin9
Copy link
Contributor

@jamartin9 jamartin9 commented Jul 6, 2023

Description

ZFS datasets in the disk menu lacked support for monitoring the read and written bytes.
This PR adds io-counters (read bytes and written bytes) for the named zfs datasets in the disks menu.

Screens:
Linux:
bottom-linux

FreeBSD:
bottom-freebsd-basic

Testing

Tested on linux and freebsd, with and without zfs.

  • Windows
  • macOS
  • Linux
  • FreeBSD

Checklist

If relevant, ensure the following have been met:

  • Areas your change affects have been linted using rustfmt (cargo fmt)
  • The change has been tested and doesn't appear to cause any unintended breakage
  • Documentation has been added/updated if needed (README.md, help menu, doc pages, etc.)
  • The pull request passes the provided CI pipeline
  • There are no merge conflicts
  • If relevant, new tests were added (don't worry too much about coverage)

I did NOT test with an extensive zfs setup (no draid/raidz/spares) just my simple mirror pools (maybe use file backed pools to test?)

If any of the Issues should be addressed or a different approach used please let me know.

Feel free to close this PR if it is unwanted.

@codecov
Copy link

codecov bot commented Jul 6, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.51 🎉

Comparison is base (ccc7091) 31.84% compared to head (a6a2f80) 32.36%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1248      +/-   ##
==========================================
+ Coverage   31.84%   32.36%   +0.51%     
==========================================
  Files          97       94       -3     
  Lines       16581    16293     -288     
==========================================
- Hits         5281     5273       -8     
+ Misses      11300    11020     -280     
Flag Coverage Δ
macos-12 33.45% <0.00%> (+0.01%) ⬆️
ubuntu-latest 33.29% <0.00%> (-0.16%) ⬇️
windows-2019 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/app/data_farmer.rs 9.28% <0.00%> (+0.16%) ⬆️
src/app/data_harvester/disks.rs 79.26% <ø> (ø)
...rc/app/data_harvester/disks/unix/linux/counters.rs 0.00% <0.00%> (ø)
src/app/data_harvester/disks/zfs_io_counters.rs 0.00% <0.00%> (ø)

... and 12 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ClementTsang ClementTsang self-assigned this Jul 6, 2023
@ClementTsang
Copy link
Owner

Seems reasonable to add, I'll take a look in a bit.

Copy link
Owner

@ClementTsang ClementTsang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good, just a few small comments.

@jamartin9
Copy link
Contributor Author

Thanks for the feedback! I have tried to address your comments. Please let me know if more is needed.

@ClementTsang ClementTsang merged commit b1a3902 into ClementTsang:master Jul 9, 2023
@jamartin9 jamartin9 mentioned this pull request Apr 2, 2024
9 tasks
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