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
statistics: better benchmark tests for merge topN #48006
Conversation
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Test result: tidb on master [$!⇡] via 🐳 orbstack via 🐹 v1.21.3 took 1m26s
❯ go test -run=^$ -bench=BenchmarkMergePartTopN2GlobalTopNWithHists -benchmem github.com/pingcap/tidb/pkg/statistics/handle/globalstats
goos: darwin
goarch: arm64
pkg: github.com/pingcap/tidb/pkg/statistics/handle/globalstats
BenchmarkMergePartTopN2GlobalTopNWithHists/Size100-8 224 6631338 ns/op 177838 B/op 30 allocs/op
BenchmarkMergePartTopN2GlobalTopNWithHists/Size1000-8 13 89028055 ns/op 177477 B/op 30 allocs/op
BenchmarkMergePartTopN2GlobalTopNWithHists/Size2000-8 4 274116135 ns/op 176676 B/op 28 allocs/op
BenchmarkMergePartTopN2GlobalTopNWithHists/Size5000-8 1 1215482458 ns/op 174808 B/op 28 allocs/op
BenchmarkMergePartTopN2GlobalTopNWithHists/Size10000-8 1 3031611292 ns/op 177688 B/op 30 allocs/op
PASS
ok github.com/pingcap/tidb/pkg/statistics/handle/globalstats 13.252s
tidb on master [$!⇡] via 🐳 orbstack via 🐹 v1.21.3 took 27s
❯ go test -run=^$ -bench=BenchmarkMergeGlobalStatsTopNByConcurrencyWithHists -benchmem github.com/pingcap/tidb/pkg/statistics/handle/globalstats
goos: darwin
goarch: arm64
pkg: github.com/pingcap/tidb/pkg/statistics/handle/globalstats
BenchmarkMergeGlobalStatsTopNByConcurrencyWithHists/Size100-8 261 6164520 ns/op 932777 B/op 162 allocs/op
BenchmarkMergeGlobalStatsTopNByConcurrencyWithHists/Size1000-8 20 57104685 ns/op 961775 B/op 163 allocs/op
BenchmarkMergeGlobalStatsTopNByConcurrencyWithHists/Size2000-8 3 392592583 ns/op 2047240 B/op 313 allocs/op
BenchmarkMergeGlobalStatsTopNByConcurrencyWithHists/Size5000-8 1 3041385250 ns/op 5217016 B/op 723 allocs/op
BenchmarkMergeGlobalStatsTopNByConcurrencyWithHists/Size10000-8 1 21334707667 ns/op 10866232 B/op 1377 allocs/op
PASS
ok github.com/pingcap/tidb/pkg/statistics/handle/globalstats 33.626s |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #48006 +/- ##
================================================
+ Coverage 71.7365% 73.0967% +1.3601%
================================================
Files 1401 1424 +23
Lines 405704 414433 +8729
================================================
+ Hits 291038 302937 +11899
+ Misses 94917 92639 -2278
+ Partials 19749 18857 -892
Flags with carried forward coverage won't be shown. Click here to find out more.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hawkingrei, qw4990 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
/retest |
1 similar comment
/retest |
Signed-off-by: hi-rustin rustin.liu@gmail.com
What problem does this PR solve?
Issue Number: None
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.