avalanchego icon indicating copy to clipboard operation
avalanchego copied to clipboard

Some more GetCanonicalValidatorSet benchmarks

Open abi87 opened this issue 1 year ago • 6 comments

Why this should be merged

How this works

How this was tested

abi87 avatar May 03 '23 14:05 abi87

abenegia@avaLabs:~/work/avalanchego$ go test -run=^$ -bench ^BenchmarkGetCanonicalValidatorSetByDepth$ github.com/ava-labs/avalanchego/vms/platformvm/warp/benchmarks -cpuprofile=cpuprofile.out goos: linux goarch: amd64 pkg: github.com/ava-labs/avalanchego/vms/platformvm/warp/benchmarks cpu: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz BenchmarkGetCanonicalValidatorSetByDepth/0-12 20356 57927 ns/op BenchmarkGetCanonicalValidatorSetByDepth/1-12 22956 50642 ns/op BenchmarkGetCanonicalValidatorSetByDepth/2-12 26288 45141 ns/op BenchmarkGetCanonicalValidatorSetByDepth/3-12 29674 38662 ns/op BenchmarkGetCanonicalValidatorSetByDepth/4-12 34130 33823 ns/op BenchmarkGetCanonicalValidatorSetByDepth/5-12 42694 28255 ns/op BenchmarkGetCanonicalValidatorSetByDepth/6-12 52185 22563 ns/op BenchmarkGetCanonicalValidatorSetByDepth/7-12 65055 16938 ns/op BenchmarkGetCanonicalValidatorSetByDepth/8-12 101066 11559 ns/op BenchmarkGetCanonicalValidatorSetByDepth/9-12 166063 6466 ns/op PASS ok github.com/ava-labs/avalanchego/vms/platformvm/warp/benchmarks 16.216s

profile001

abi87 avatar May 03 '23 20:05 abi87

I feel like we should probably be separating benchmarks for GetCanonicalValidatorSet and GetValidatorSet rather than expanding tests for GetCanonicalValidatorSet to include the actual GetValidatorSet implementation

StephenButtolph avatar May 20 '23 00:05 StephenButtolph

I feel like we should probably be separating benchmarks for GetCanonicalValidatorSet and GetValidatorSet rather than expanding tests for GetCanonicalValidatorSet to include the actual GetValidatorSet implementation

@StephenButtolph , I think @aaronbuchwald request was to have a scenario as close as possible to prod, to get a feeling of the costs of supporting GetCanonicalValidatorSet. Also bls key creation really dominates all of other ops, hence I doubt we would get much more insight until we optimize/cache bls keys handling?

abi87 avatar May 20 '23 10:05 abi87

This PR has become stale because it has been open for 30 days with no activity. Adding the lifecycle/frozen label will cause this PR to ignore lifecycle events.

github-actions[bot] avatar Jul 09 '23 00:07 github-actions[bot]

This PR has become stale because it has been open for 30 days with no activity. Adding the lifecycle/frozen label will cause this PR to ignore lifecycle events.

github-actions[bot] avatar Sep 17 '23 00:09 github-actions[bot]

This PR has become stale because it has been open for 30 days with no activity. Adding the lifecycle/frozen label will cause this PR to ignore lifecycle events.

github-actions[bot] avatar Mar 24 '24 00:03 github-actions[bot]