-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
VDiff: Add some stats #15175
VDiff: Add some stats #15175
Conversation
Signed-off-by: Matt Lord <mattalord@gmail.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #15175 +/- ##
==========================================
+ Coverage 67.29% 67.41% +0.12%
==========================================
Files 1560 1560
Lines 192089 192996 +907
==========================================
+ Hits 129259 130114 +855
- Misses 62830 62882 +52 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
@@ -44,7 +44,10 @@ comment: # https://docs.codecov.com/docs/pull-request-comments | |||
|
|||
coverage: | |||
status: # https://docs.codecov.com/docs/commit-status | |||
patch: | |||
default: | |||
informational: true # Don't ever fail the codecov/patch test |
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 meant to do this in: #14967
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Because we're not deferring a new function, the parameters passed to Record are calculated when we register the defer and thus Record is able to compare the current time to the time we passed in when registering the defer (time.Now()). Signed-off-by: Matt Lord <mattalord@gmail.com>
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.
Thanks. Some nits, otherwise lgtm.
defer testStats.controllers[id].TableDiffPhaseTimings.Record(phase, time.Now()) | ||
time.Sleep(sleepTime) | ||
} | ||
want := int64(1.2 * float64(sleepTime)) // Allow 20% overhead for recording timing |
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.
We have seen flakiness with such precise timings in the past, especially since you are dealing in milliseconds here. We should probably just compare that it is not zero.
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 can update it if it becomes flaky. I don't recall ever seeing TestVReplicationStats
fail, and that does the same thing. If they are flaky then we should update both.
Signed-off-by: Matt Lord <mattalord@gmail.com>
Description
VDiff emitted no metrics/stats (not technically true after #14786) so you could not monitor it in the standard Vitess ways — e.g. see some of the key VReplication stats. Instead you relied on the
vdiff show
command. While theshow
command provides the information you'd typically want to know about a specific vdiff — you could not monitor and graph vdiff stats over time and correlate those with other system events (e.g. to try and understand why a vdiff was taking longer than expected) and you got no aggregated stats across vdiffs.This PR adds some initial metrics that I believe will be helpful to monitor and debug the VDiff component and individual vdiffs over time. You can see example stats and metrics here: https://gist.github.com/mattlord/bf49025acc7fe0c9d84da35b86ccc555
Related Issue(s)
Checklist