-
Notifications
You must be signed in to change notification settings - Fork 139
feat(ipld/merkledag): add total size of visited nodes in progress tracker #1071
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Vladimir Erdman <[email protected]>
lidel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vlerdman thank you for submitting this – any chance you could also:
- open a PR in https://github.com/ipfs/kubo that uses this in
ipfs pin addcommand and has green CI there as well
? (it would speed up review process)
ipld/merkledag/merkledag.go
Outdated
| // Total is the total number of nodes fetched. | ||
| Total int | ||
| // TotalSize is the total size of the nodes fetched. | ||
| TotalSize uint64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: good oportunity to be more clear than ambigous "Total", perhaps:
Nodes int // number of nodes visited
Bytes uint64 // total bytes of raw block dataThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
@lidel Thanks for such fast feedback! Opened a PR - ipfs/kubo#11074 |
|
Triage:
|
This PR adds tracking total size of nodes during graph walk. New code saves backward compability with ipfs/kubo.
Changes
merkledag.ProgressTrackerto save and updateTotalSizeof visited nodesGetLinksDirectfunction instead ofvisittestProgressIndicatorfor checkingTotalSizeReferences
pin addprogress reports. kubo#8915