-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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: support tracking histogram #36170
Conversation
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]> make loaded atomic Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]> add size metrics Signed-off-by: yisaer <[email protected]> Revert "add size metrics" This reverts commit 05b06a3f4f3ad98ae3f6ca389db2fc8ccc193dc4.
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]> add comment Signed-off-by: yisaer <[email protected]>
This reverts commit e25e725.
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]> fix test Signed-off-by: yisaer <[email protected]> fix test Signed-off-by: yisaer <[email protected]> use topn Signed-off-by: yisaer <[email protected]> fix test Signed-off-by: yisaer <[email protected]> fix test Signed-off-by: yisaer <[email protected]> fix test Signed-off-by: yisaer <[email protected]> fix test Signed-off-by: yisaer <[email protected]> fix test Signed-off-by: yisaer <[email protected]> fix test Signed-off-by: yisaer <[email protected]> Revert "fix test" This reverts commit bdaa13a04a475df129e40ffbc70a16064df37886. Revert "fix test" This reverts commit a206543ea2ac7712d6a1f2748d1acb50ff0f426f. Revert "fix test" This reverts commit 290d516009f6f92711a9b4a73d5c90f7051413c2. Revert "fix test" This reverts commit f29737ace34c3174af4e64943640675f2aaa1178.
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]>
986e237
to
ea4d45f
Compare
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]>
func (c *Column) dropHist() { | ||
c.Histogram.Bounds = chunk.NewChunkWithCapacity([]*types.FieldType{types.NewFieldType(mysql.TypeBlob)}, 0) | ||
c.Histogram.Buckets = make([]Bucket, 0) | ||
c.Histogram.scalars = make([]scalar, 0) |
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.
Can we just set Bounds
, Buckets
and scalars
to nil?
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.
This may cause panic in some Histogram functions which are hard to cover, thus I tend to set it as empty slice.
@@ -139,8 +139,11 @@ func (hg *Histogram) MemoryUsage() (sum int64) { | |||
if hg == nil { | |||
return | |||
} | |||
if len(hg.Buckets) == 0 && len(hg.scalars) == 0 && hg.Bounds.Capacity() == 0 { | |||
return |
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.
hg
still takes EmptyHistogramSize
if it is not nil?
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.
Right, but we will think it as 0, the difference is acceptable.
Signed-off-by: yisaer <[email protected]>
…into support_tracking_hist
Signed-off-by: yisaer <[email protected]>
Signed-off-by: yisaer <[email protected]>
Code Coverage Details: https://codecov.io/github/pingcap/tidb/commit/5223e7c1ebcb0a099ebb3d6f0bb1da84861f5386 |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 1c04420
|
TiDB MergeCI notify🔴 Bad News! New failing [1] after this pr merged.
|
What problem does this PR solve?
Issue Number: ref #34052
Problem Summary:
What is changed and how it works?
Check List
Tests
test report
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.