-
Notifications
You must be signed in to change notification settings - Fork 742
statistics: more friendly output #3731
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
Conversation
Signed-off-by: lhy1024 <admin@liudos.us>
Codecov Report
@@ Coverage Diff @@
## master #3731 +/- ##
==========================================
+ Coverage 74.82% 74.84% +0.01%
==========================================
Files 244 244
Lines 24374 24400 +26
==========================================
+ Hits 18239 18261 +22
- Misses 4511 4514 +3
- Partials 1624 1625 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
HotDegree int `json:"hot_degree"` | ||
ByteRate float64 `json:"flow_bytes"` | ||
KeyRate float64 `json:"flow_keys"` | ||
AntiCount int `json:"anti_count"` |
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.
I don't think users can understand it.
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.
But I think it's helpful for us to debug.
server/api/trend.go
Outdated
@@ -152,9 +152,9 @@ func (h *trendHandler) getStoreFlow(stats statistics.StoreHotPeersStat, regionSt | |||
return | |||
} | |||
if stat, ok := stats[storeID]; ok { | |||
storeFlow = stat.TotalLoads[regionStatKind] | |||
storeFlow = stat.TotalBytesRate |
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.
The variable name doesn't match its meaning.
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.
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.
So we need to make it better.
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.
done
server/api/trend.go
Outdated
for _, flow := range stat.Stats { | ||
regionFlows = append(regionFlows, flow.GetLoad(regionStatKind)) | ||
regionFlows = append(regionFlows, flow.ByteRate) |
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.
ditto
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.
done
Does this affect the |
This pr will let TIDB_HOT_REGION table But I found |
Signed-off-by: lhy1024 <admin@liudos.us>
[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. |
/merge |
@lhy1024: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: 70e266b
|
@lhy1024: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/run-integration-common-test |
* more friendly output Signed-off-by: lhy1024 <admin@liudos.us> * address comment Signed-off-by: lhy1024 <admin@liudos.us> * fix lint Signed-off-by: lhy1024 <admin@liudos.us> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
* more friendly output Signed-off-by: lhy1024 <admin@liudos.us> * address comment Signed-off-by: lhy1024 <admin@liudos.us> * fix lint Signed-off-by: lhy1024 <admin@liudos.us> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Signed-off-by: lhy1024 admin@liudos.us
What problem does this PR solve?
After #3591, we use []float64 to represent hot peer loads, but output is no friendly.
After this pr:
What is changed and how it works?
Check List
Tests
Release note