Updated dbg scripts with changes, adopted mbid.mrid in debug prints

This format for mids is a compromise in readability vs debugability.

For example, if our mbid weight is 256 (4KiB blocks), the 19th entry
in the second mdir would be the raw integer 275. With this mid format,
we would print it as 256.19.

The idea is to make it easy to see it's the 19th entry in the mdir while
still making it relatively easy to see that 256.19 and 275 are
equivalent when debugging.

---

The scripts also took some tweaking due to the mid change. Tried to keep
the names consistent, but I don't think it's worthwhile to change too
much of the scripts while they are working.
This commit is contained in:
Christopher Haster
2023-08-31 17:33:57 -05:00
parent a9b81820b0
commit f7900edc1c
6 changed files with 235 additions and 167 deletions

View File

@@ -421,7 +421,7 @@ def dbg_log(data, block_size, rev, off, weight, *,
print('%-8s %*s%-*s %-22s %s' % (
'off',
lifetime_width, '',
w_width, 'ids',
w_width, 'rid',
'tag',
'data (truncated)'
if not args.get('no_truncate') else ''))
@@ -750,7 +750,7 @@ def dbg_tree(data, block_size, rev, trunk, weight, *,
print('%-8s %*s%-*s %-22s %s' % (
'off',
t_width, '',
w_width, 'ids',
w_width, 'rid',
'tag',
'data (truncated)'
if not args.get('no_truncate') else ''))