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

Performance benchmark tests #356

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Conversation

MatheusFranco99
Copy link
Contributor

@MatheusFranco99 MatheusFranco99 commented Jan 31, 2024

Overview

Benchmark tests to:

  • measure performance
  • keep track of performance impact for each new protocol change

It includes performance tests for:

  • Full duty
  • Consensus full round
  • Partial Signature messages
  • QBFT message type by round and occurrence number

Example of output:

> go test -bench=.

Total duty (1 rounds): 34151 us.
Total duty (2 rounds): 99156 us.
Total duty (3 rounds): 163420 us.
Total duty (4 rounds): 230917 us.
Total duty (5 rounds): 294369 us.
Total duty (6 rounds): 375205 us.
Consensus round 1 time: [1 1 1 1 1 1 1 2 2] ms. Total: 13695 us
Consensus round 2 time: [4 9 22 19 1 1 1 1 1 1 1 2] ms. Total: 67681 us
Consensus round 3 time: [4 9 22 19 1 1 1 1 1 1 1 1] ms. Total: 66318 us
Consensus round 1 msg type 0 time: 1601 us.
Consensus round 1 msg type 1 time: 1159 us.
Consensus round 1 msg type 2 time: 1111 us.
Consensus round 2 msg type 3 time: 4631 us.
Consensus round 2 msg type 0 time: 19151 us.
Consensus round 2 msg type 1 time: 1108 us.
Consensus round 2 msg type 2 time: 1148 us.
Consensus round 3 msg type 3 time: 4500 us.
Consensus round 3 msg type 0 time: 18945 us.
Consensus round 3 msg type 1 time: 1190 us.
Consensus round 3 msg type 2 time: 1228 us.
Consensus round 2 msg type 3 occurrence 1 time: 4866 us.
Consensus round 2 msg type 3 occurrence 2 time: 9500 us.
Consensus round 2 msg type 3 occurrence 3 time: 22230 us.
Consensus round 3 msg type 3 occurrence 1 time: 4697 us.
Consensus round 3 msg type 3 occurrence 2 time: 9354 us.
Consensus round 3 msg type 3 occurrence 3 time: 22467 us.
Single partial message time: 2319 us.
Pre-consensus full committee: 11210 us.
Post-consensus: 8484 us.
BLS Signing time: 526.67 ± 38.42 us.
BLS Verification time: 1151.33 ± 2.05 us.
Reconstruct + Verify signature: 1563 us.
Reconstruct (from the above diff): 411.67 us.
Aggregate 3 signatures: 566 us.
PASS
ok

@MatheusFranco99 MatheusFranco99 self-assigned this Jan 31, 2024
@MatheusFranco99
Copy link
Contributor Author

@GalRogozinski
I think this PR is super useful for us to have a view about our protocol and how our changes are improving it
Not only that, I find it super useful to have these views for later optimizations.
But, since I created this with not much care (just as some util for me), I would prefer putting it into a better shape before merging it, and even adding more analytics

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.

1 participant