Skunkworks 2024:
The idea is to build on top of PM-2957 and add the dump_blocks command. The existing dump_pages may already have all the information but I will need to check.
I'd like to be able to print graphs about blocks and their location in a file. This way, we should be able to assess rapidly if the file is fragmented or not. We should be able to use the tool before/after compaction to verify compaction has rewritten blocks at the expected locations.
Given files can be quite big and it might be hard to display what each offset is made of, it would be great to show the empty space as well. For instance, it could be interesting to know we have lots of empty small blocks which could explain why we may have a lot of free space but that cannot be reused.