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

feat:lotus-bench:AMT benchmarking #11075

Merged
merged 4 commits into from
Jul 20, 2023
Merged

feat:lotus-bench:AMT benchmarking #11075

merged 4 commits into from
Jul 20, 2023

Conversation

ZenGround0
Copy link
Contributor

Related Issues

#11035

Proposed Changes

lotus-bench amt creates an in memory amt and measures a breakdown of its size and node count between link and value nodes. It further measures the size of churn when overwriting a portion of the amt.

Additional Info

This doesn't need any additional testing, I've used the tool enough to see that it generally works and its results make sense in the context of the problem I used it to solve.

If anyone cared to do so they could generalize the amt setup for different bitwidths and sizes. This was not valuable for the problem I was trying to solve so I have deferred doing this.

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

@ZenGround0 ZenGround0 requested a review from a team as a code owner July 13, 2023 06:14
@@ -0,0 +1,309 @@
package main

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just copy pasted from AMT package. Couldnt import because it is internal over there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain/link directly to the AMT package?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this is just code for reading/writing from go memory structures to cbor bytes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the rest of the code looks great, just this question: Does it make sense to add a comment to the top of the file with this link and maybe an explanation of why you are adding it to this repo instead of linking/import it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also there's a lint issue

Copy link
Contributor

@snissn snissn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ZenGround0 ZenGround0 merged commit 15faab8 into master Jul 20, 2023
@ZenGround0 ZenGround0 deleted the bench/amt-churn branch July 20, 2023 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants