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(stf/branch): simplify merged iterator #22131

Merged
merged 18 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion runtime/v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.23
// server v2 integration
replace (
cosmossdk.io/api => ../../api
cosmossdk.io/core/testing => ../../core/testing
cosmossdk.io/server/v2/appmanager => ../../server/v2/appmanager
cosmossdk.io/server/v2/stf => ../../server/v2/stf
cosmossdk.io/store/v2 => ../../store/v2
Expand All @@ -30,7 +31,7 @@ require (
require (
buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.1-20240701160653-fedbb9acfd2f.1 // indirect
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.1-20240130113600-88ef6483f90f.1 // indirect
cosmossdk.io/core/testing v0.0.0-20240923163230-04da382a9f29 // indirect
cosmossdk.io/core/testing v0.0.0 // indirect
cosmossdk.io/errors/v2 v2.0.0-20240731132947-df72853b3ca5 // indirect
github.com/DataDog/zstd v1.5.5 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand Down
2 changes: 0 additions & 2 deletions runtime/v2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.1-20240130113600-88e
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.1-20240130113600-88ef6483f90f.1/go.mod h1:zqi/LZjZhyvjCMTEVIwAf5VRlkLduuCfqmZxgoormq0=
cosmossdk.io/core v1.0.0-alpha.5 h1:McjYXAQ6XcT20v2uHyH7PhoWH8V+mebzfVFqT3GinsI=
cosmossdk.io/core v1.0.0-alpha.5/go.mod h1:3u9cWq1FAVtiiCrDPpo4LhR+9V6k/ycSG4/Y/tREWCY=
cosmossdk.io/core/testing v0.0.0-20240923163230-04da382a9f29 h1:NxxUo0GMJUbIuVg0R70e3cbn9eFTEuMr7ev1AFvypdY=
cosmossdk.io/core/testing v0.0.0-20240923163230-04da382a9f29/go.mod h1:8s2tPeJtSiQuoyPmr2Ag7meikonISO4Fv4MoO8+ORrs=
cosmossdk.io/depinject v1.0.0 h1:dQaTu6+O6askNXO06+jyeUAnF2/ssKwrrszP9t5q050=
cosmossdk.io/depinject v1.0.0/go.mod h1:zxK/h3HgHoA/eJVtiSsoaRaRA2D5U4cJ5thIG4ssbB8=
cosmossdk.io/errors/v2 v2.0.0-20240731132947-df72853b3ca5 h1:IQNdY2kB+k+1OM2DvqFG1+UgeU1JzZrWtwuWzI3ZfwA=
Expand Down
3 changes: 2 additions & 1 deletion server/v2/cometbft/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.23.1

replace (
cosmossdk.io/api => ../../../api
cosmossdk.io/core/testing => ../../../core/testing
cosmossdk.io/server/v2 => ../
cosmossdk.io/server/v2/appmanager => ../appmanager
cosmossdk.io/server/v2/stf => ../stf
Expand Down Expand Up @@ -43,7 +44,7 @@ require (
require (
buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.1-20240701160653-fedbb9acfd2f.1 // indirect
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.1-20240130113600-88ef6483f90f.1 // indirect
cosmossdk.io/core/testing v0.0.0-20240923163230-04da382a9f29 // indirect
cosmossdk.io/core/testing v0.0.0 // indirect
cosmossdk.io/depinject v1.0.0 // indirect
cosmossdk.io/errors v1.0.1 // indirect
cosmossdk.io/math v1.3.0 // indirect
Expand Down
2 changes: 0 additions & 2 deletions server/v2/cometbft/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s=
cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0=
cosmossdk.io/core v1.0.0-alpha.5 h1:McjYXAQ6XcT20v2uHyH7PhoWH8V+mebzfVFqT3GinsI=
cosmossdk.io/core v1.0.0-alpha.5/go.mod h1:3u9cWq1FAVtiiCrDPpo4LhR+9V6k/ycSG4/Y/tREWCY=
cosmossdk.io/core/testing v0.0.0-20240923163230-04da382a9f29 h1:NxxUo0GMJUbIuVg0R70e3cbn9eFTEuMr7ev1AFvypdY=
cosmossdk.io/core/testing v0.0.0-20240923163230-04da382a9f29/go.mod h1:8s2tPeJtSiQuoyPmr2Ag7meikonISO4Fv4MoO8+ORrs=
cosmossdk.io/depinject v1.0.0 h1:dQaTu6+O6askNXO06+jyeUAnF2/ssKwrrszP9t5q050=
cosmossdk.io/depinject v1.0.0/go.mod h1:zxK/h3HgHoA/eJVtiSsoaRaRA2D5U4cJ5thIG4ssbB8=
cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0=
Expand Down
96 changes: 96 additions & 0 deletions server/v2/stf/branch/bench_22131.txt
Copy link
Member

Choose a reason for hiding this comment

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

should we be committing these? It's probably good enough to drop the output into the PR.

Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
goos: darwin
goarch: arm64
pkg: cosmossdk.io/server/v2/stf/branch
cpu: Apple M3 Max
Benchmark_CacheStack_Set/StackSize1-14 36413290 33.31 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize1-14 35942940 34.33 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize1-14 36227097 32.59 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize1-14 36985620 32.62 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize1-14 34493827 32.62 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize1-14 37298065 32.46 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize1-14 37051664 32.55 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize1-14 36883686 32.48 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize1-14 37034179 32.59 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize1-14 36960226 32.46 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize10-14 26045575 46.27 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize10-14 25950037 46.15 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize10-14 26205926 46.01 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize10-14 25982696 46.00 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize10-14 26053021 46.06 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize10-14 25772341 46.08 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize10-14 25855080 46.17 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize10-14 26162884 46.08 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize10-14 26146875 46.11 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize10-14 25878520 45.99 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize100-14 26067688 46.20 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize100-14 26085656 46.02 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize100-14 26131170 46.01 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize100-14 26144407 46.06 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize100-14 26018938 46.02 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize100-14 25682228 48.46 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize100-14 26095701 46.54 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize100-14 26147968 48.50 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize100-14 25609377 46.66 ns/op 2 B/op 2 allocs/op
Benchmark_CacheStack_Set/StackSize100-14 25418208 46.67 ns/op 2 B/op 2 allocs/op
Benchmark_Get/StackSize1-14 47967780 24.95 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize1-14 47577195 25.19 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize1-14 47781637 24.94 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize1-14 47332609 25.00 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize1-14 47787187 25.03 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize1-14 48496687 24.83 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize1-14 48153289 24.89 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize1-14 48453279 24.69 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize1-14 48500605 24.71 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize1-14 48790486 24.77 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize10-14 3676309 328.9 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize10-14 3665226 327.0 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize10-14 3669343 327.1 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize10-14 3674840 327.2 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize10-14 3667174 327.1 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize10-14 3665042 327.0 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize10-14 3666630 327.0 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize10-14 3665234 327.5 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize10-14 3680134 326.8 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize10-14 3663696 326.7 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize100-14 237254 5028 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize100-14 240108 5267 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize100-14 242304 5014 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize100-14 236968 5136 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize100-14 246918 5086 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize100-14 240165 4959 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize100-14 242150 5030 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize100-14 245880 4891 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize100-14 236239 5019 ns/op 1 B/op 1 allocs/op
Benchmark_Get/StackSize100-14 239452 5012 ns/op 1 B/op 1 allocs/op
testinginprod marked this conversation as resolved.
Show resolved Hide resolved
Benchmark_Iterate/StackSize1-14 4859352 248.2 ns/op 984 B/op 7 allocs/op
Benchmark_Iterate/StackSize1-14 4786867 250.3 ns/op 984 B/op 7 allocs/op
Benchmark_Iterate/StackSize1-14 4754394 250.2 ns/op 984 B/op 7 allocs/op
Benchmark_Iterate/StackSize1-14 4808739 249.5 ns/op 984 B/op 7 allocs/op
Benchmark_Iterate/StackSize1-14 4803613 249.8 ns/op 984 B/op 7 allocs/op
Benchmark_Iterate/StackSize1-14 4794133 250.9 ns/op 984 B/op 7 allocs/op
Benchmark_Iterate/StackSize1-14 4799314 249.4 ns/op 984 B/op 7 allocs/op
Benchmark_Iterate/StackSize1-14 4784235 252.0 ns/op 984 B/op 7 allocs/op
Benchmark_Iterate/StackSize1-14 4848817 251.2 ns/op 984 B/op 7 allocs/op
Benchmark_Iterate/StackSize1-14 4752552 251.1 ns/op 984 B/op 7 allocs/op
Benchmark_Iterate/StackSize10-14 91701 13156 ns/op 10848 B/op 232 allocs/op
Benchmark_Iterate/StackSize10-14 91626 13236 ns/op 10848 B/op 232 allocs/op
Benchmark_Iterate/StackSize10-14 91365 14143 ns/op 10848 B/op 232 allocs/op
Benchmark_Iterate/StackSize10-14 83239 13882 ns/op 10848 B/op 232 allocs/op
Benchmark_Iterate/StackSize10-14 88155 13691 ns/op 10848 B/op 232 allocs/op
Benchmark_Iterate/StackSize10-14 84646 13487 ns/op 10848 B/op 232 allocs/op
Benchmark_Iterate/StackSize10-14 89509 13241 ns/op 10848 B/op 232 allocs/op
Benchmark_Iterate/StackSize10-14 91993 13247 ns/op 10848 B/op 232 allocs/op
Benchmark_Iterate/StackSize10-14 90870 13235 ns/op 10848 B/op 232 allocs/op
Benchmark_Iterate/StackSize10-14 89091 13219 ns/op 10848 B/op 232 allocs/op
Benchmark_Iterate/StackSize100-14 831 1437972 ns/op 109488 B/op 2482 allocs/op
Benchmark_Iterate/StackSize100-14 831 1442003 ns/op 109488 B/op 2482 allocs/op
Benchmark_Iterate/StackSize100-14 830 1440507 ns/op 109488 B/op 2482 allocs/op
Benchmark_Iterate/StackSize100-14 832 1438528 ns/op 109494 B/op 2482 allocs/op
Benchmark_Iterate/StackSize100-14 836 1439228 ns/op 109488 B/op 2482 allocs/op
Benchmark_Iterate/StackSize100-14 828 1444444 ns/op 109488 B/op 2482 allocs/op
Benchmark_Iterate/StackSize100-14 836 1437128 ns/op 109488 B/op 2482 allocs/op
Benchmark_Iterate/StackSize100-14 836 1437714 ns/op 109488 B/op 2482 allocs/op
Benchmark_Iterate/StackSize100-14 834 1441704 ns/op 109488 B/op 2482 allocs/op
Benchmark_Iterate/StackSize100-14 832 1447616 ns/op 109488 B/op 2482 allocs/op
testinginprod marked this conversation as resolved.
Show resolved Hide resolved
PASS
ok cosmossdk.io/server/v2/stf/branch 120.114s
Loading
Loading