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

fix(nns): Fix benchmark by simulating proper behavior in canbench-rs build #3160

Merged
merged 3 commits into from
Dec 13, 2024

Conversation

max-dfinity
Copy link
Contributor

In order to get approximately the same number of read/writes in stable for the VotingStateMachine, it is required to count accurately. Canbench doesn't allow queries, which means the instruction_counter never gives a different result, which means the benchmark thinks it runs out of cycles on every iteration, and thus saves and restores the ProposalVotingStateMachine over and over, leading to an inaccurate benchmark compared to production.

This adds code to approximately simulate behavior in canbench-rs build.

@github-actions github-actions bot added the fix label Dec 12, 2024
@max-dfinity max-dfinity marked this pull request as ready for review December 12, 2024 21:31
@max-dfinity max-dfinity requested a review from a team as a code owner December 12, 2024 21:31
@max-dfinity max-dfinity added this pull request to the merge queue Dec 13, 2024
Merged via the queue into master with commit ee52ab3 Dec 13, 2024
25 checks passed
@max-dfinity max-dfinity deleted the msum/NNS1-3501 branch December 13, 2024 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants