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

Unmounted datasets lead to confusing gaps in output #5

Closed
Freaky opened this issue Jan 14, 2022 · 3 comments · Fixed by #7
Closed

Unmounted datasets lead to confusing gaps in output #5

Freaky opened this issue Jan 14, 2022 · 3 comments · Fixed by #7

Comments

@Freaky
Copy link
Collaborator

Freaky commented Jan 14, 2022

Stats for unmounted datasets aren't exported, so you can end up with incomplete hierarchies in ioztat output. For example here rpool and rpool/ROOT aren't mounted, leaving rpool/ROOT/default without the path leading up to it:

dataset                                         w/s      wMB/s        r/s      rMB/s   wareq-sz   rareq-sz
      default                                  0.00       0.00       0.97       0.00       0.00       0.05

Similarly, rpool/usr/local/poudriere/ports/default misses the mountpoint-less poudriere/ports segments:

   usr                                         0.00       0.00       0.97       0.00       0.00       0.01
      local                                    0.00       0.00       0.00       0.00       0.00       0.00
               default                         0.00       0.00       0.00       0.00       0.00       0.00
@adriaandegroot
Copy link
Contributor

There's an implementation that shows the unique-after-the-previous-segments, which would turn the second example into

   usr                                         0.00       0.00       0.97       0.00       0.00       0.01
      local                                    0.00       0.00       0.00       0.00       0.00       0.00
         poudriere/ports/default               0.00       0.00       0.00       0.00       0.00       0.00

If we're going to keep doing 2-competing-implementations 😺 then an alternative would be to output the missing segments on lines of their own with no data. Neither seems particularly visually appealing, though. I find the extra name-segments to "fill in the gaps" distracting.

@Freaky
Copy link
Collaborator Author

Freaky commented Jan 15, 2022

I think having the missing segments on their own line is the way to go, then you're not having to switch between two different ways of reading the output and less likely to get confused by more complex hierarchies. e.g:

dataset                                         w/s      wMB/s        r/s      rMB/s   wareq-sz   rareq-sz
rpool/ROOT/ubuntu_geaox3                       0.00       0.00       0.00       0.00       0.00       0.00
         srv                                   0.00       0.00       0.00       0.00       0.00       0.00

vs:

dataset                                         w/s      wMB/s        r/s      rMB/s   wareq-sz   rareq-sz
rpool
   ROOT
      ubuntu_geaox3                            0.00       0.00       0.00       0.00       0.00       0.00
         srv                                   0.00       0.00       0.00       0.00       0.00       0.00

The latter makes srv's position obvious, while the former has you squinting at this sudden run of whitespace and trying to guess.

Freaky added a commit to Freaky/ioztat that referenced this issue Jan 15, 2022
Fixes jimsalterjrs#5

This finds the longest common prefix of path segments since the last and
current dataset and prints any up to the final segment that have been
missed.

For example, a root mount at rpool/ROOT/default would previously be
displayed thus:

dataset
      default ...

This ensures the path leading up to it have their own lines:

dataset
rpool
   ROOT
      default ...

I believe this to be a more consistent fix than the one proposed in jimsalterjrs#6
where intermediates are formatted on a single line.
@Freaky
Copy link
Collaborator Author

Freaky commented Jan 15, 2022

Wait, I could have sworn I branched that off main. Gah. I'll get to it later, I need to go make food.

Freaky added a commit to Freaky/ioztat that referenced this issue Jan 15, 2022
Fixes jimsalterjrs#5

This finds the longest common prefix of path segments since the last and
current dataset and prints any up to the final segment that have been
missed.

For example, a root mount at rpool/ROOT/default would previously be
displayed thus:

dataset
        default ...

This ensures the path leading up to it have their own lines:

dataset
rpool
    ROOT
        default ...

I believe this to be a more consistent fix than the one proposed in jimsalterjrs#6
where intermediates are formatted on a single line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants