-
Notifications
You must be signed in to change notification settings - Fork 474
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: block validation benchmark #4522
performance: block validation benchmark #4522
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4522 +/- ##
==========================================
- Coverage 55.28% 55.23% -0.06%
==========================================
Files 398 398
Lines 50336 50336
==========================================
- Hits 27829 27801 -28
- Misses 20178 20203 +25
- Partials 2329 2332 +3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
ledger/fullblock_perf_test.go
Outdated
var blocks []bookkeeping.Block | ||
var txPerBlock int | ||
var numAss, numPay int | ||
fmt.Printf("Preparing transactions and adding the blocks (/%d): ", numBlocks) |
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.
b.logf ?
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.
b.logf will print at the end. This way it will be more interactive.
…atabase locked issue.
…nt/5mb_blocks_bench
Block validation benchmark
resolves https://github.com/algorand/go-algorand-internal/issues/2259
$ go test -run none -v -bench BenchmarkBlockValidation -timeout=500000s -benchtime=10x
ld: warning: -no_pie is deprecated when targeting new OS versions
goos: darwin
goarch: amd64
pkg: github.com/algorand/go-algorand/ledger
cpu: Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
BenchmarkBlockValidationJustPayNoNew
Preparing... /1: 100% 1.7s
Summary 1 blocks and 27026 txns: pay 27026/blk (100%) assets 0/blk (0%) apps 0/blk (0%)
1.1 sec / 1 blks
Preparing... /10: 20% 3.4s 40% 3.4s 60% 3.4s 80% 3.3s 100% 3.4s
Summary 10 blocks and 265337 txns: pay 26533/blk (100%) assets 0/blk (0%) apps 0/blk (0%)
11.0 sec / 10 blks
BenchmarkBlockValidationJustPayNoNew-8 10 1099660242 ns/op
BenchmarkBlockValidationJustPay
Preparing... /1: 100% 2.2s
Summary 1 blocks and 26752 txns: pay 26752/blk (100%) assets 0/blk (0%) apps 0/blk (0%)
1.5 sec / 1 blks
Preparing... /10: 20% 4.3s 40% 4.3s 60% 4.2s 80% 4.4s 100% 4.7s
Summary 10 blocks and 262667 txns: pay 26266/blk (100%) assets 0/blk (0%) apps 0/blk (0%)
14.8 sec / 10 blks
BenchmarkBlockValidationJustPay-8 10 1479483790 ns/op
BenchmarkBlockValidationNoNew
Preparing... /1: 100% 3.2s
Summary 1 blocks and 24581 txns: pay 2930/blk (11%) assets 15453/blk (62%) apps 6198/blk (25%)
2.1 sec / 1 blks
Preparing... /10: 20% 6.0s 40% 5.4s 60% 5.8s 80% 5.4s 100% 6.0s
Summary 10 blocks and 239915 txns: pay 3254/blk (13%) assets 14224/blk (59%) apps 6512/blk (27%)
22.7 sec / 10 blks
BenchmarkBlockValidationNoNew-8 10 2266421693 ns/op
BenchmarkBlockValidationMix
Preparing... /1: 100% 2.8s
Summary 1 blocks and 24773 txns: pay 5905/blk (23%) assets 13339/blk (53%) apps 5529/blk (22%)
2.4 sec / 1 blks
Preparing... /10: 20% 5.4s 40% 6.0s 60% 5.2s 80% 5.6s 100% 6.3s
Summary 10 blocks and 242232 txns: pay 5955/blk (24%) assets 12737/blk (52%) apps 5530/blk (22%)
23.4 sec / 10 blks
BenchmarkBlockValidationMix-8 10 2343313013 ns/op
PASS
ok github.com/algorand/go-algorand/ledger 245.240s