jimsalterjrs/ioztat

Unmounted datasets lead to confusing gaps in output

Closed this issue · 3 comments

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

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.

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.

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