-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
test: Add query benchmarks #13657
test: Add query benchmarks #13657
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #13657 +/- ##
==========================================
+ Coverage 54.69% 56.44% +1.75%
==========================================
Files 645 648 +3
Lines 55745 56249 +504
==========================================
+ Hits 30491 31752 +1261
+ Misses 22764 21934 -830
- Partials 2490 2563 +73
|
|
Final results:
The zip file contains both memory and cpu profiles |
func setup() { | ||
// TODO: change this | ||
db, err := dbm.NewGoLevelDB("application", "/Users/facundo/Downloads/testinghomedir/data") | ||
if err != nil { | ||
panic(err) | ||
} | ||
logger := log.TestingLogger() | ||
app = simapp.NewSimApp(logger, db, nil, true, simtestutil.NewAppOptionsWithFlagHome("/Users/facundo/Downloads/testinghomedir")) | ||
} |
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.
Please fix with e.g. t.TempDir
Any suggestion? $ go test -v -run=xxx -bench='(BenchmarkQueryBalance|BenchmarkQueryAllBalances|BenchmarkQueryVotes|BenchmarkQuerySigningInfos|BenchmarkQueryValidatorDelegations)' .
goos: darwin
goarch: arm64
pkg: cosmossdk.io/simapp
BenchmarkQueryBalance
benchs_test.go:47: wrong balance 0 742318
--- FAIL: BenchmarkQueryBalance
BenchmarkQueryAllBalances
benchs_test.go:67: wrong balance 0 742318
--- FAIL: BenchmarkQueryAllBalances
BenchmarkQueryVotes
benchs_test.go:109: wrong number of votes 0
--- FAIL: BenchmarkQueryVotes
BenchmarkQuerySigningInfos
benchs_test.go:129: wrong number of signing infos 0
--- FAIL: BenchmarkQuerySigningInfos
BenchmarkQueryValidatorDelegations
benchs_test.go:151: wrong number of delegations 0
--- FAIL: BenchmarkQueryValidatorDelegations
FAIL
exit status 1
FAIL cosmossdk.io/simapp 0.559s
FAIL |
@peterbourgon the benchmarks in the go files, right now, are meant to be ran against a directory that contains Gaia's state. Currently, they are a PoC than an actual benchmark. |
Gotcha! And totally fair given this is still in draft 😉 Willing to do whatever manual work, if you can lay it out in a reasonably reproducible way. But also happy to wait for your updates. |
closing this as it has reached our 30 day window of inactivity when keeping prs open |
Description
Closes: #13605
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change