-
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
infoschema: add metrics_summary_by_label table to query all detail metrics #14663
Conversation
Signed-off-by: crazycs <crazycs520@gmail.com>
@@ -853,6 +853,10 @@ func createSessionFunc(store kv.Storage) pools.Factory { | |||
if err != nil { | |||
return nil, errors.Trace(err) | |||
} | |||
err = variable.SetSessionSystemVar(se.sessionVars, variable.MaxAllowedPacket, types.NewStringDatum("67108864")) |
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.
In PR #11137, concat_ws
will need this variable, so I set this variable here for internal sql.
Signed-off-by: crazycs <crazycs520@gmail.com>
Signed-off-by: crazycs <crazycs520@gmail.com>
/run-all-tests |
executor/metric_reader.go
Outdated
startTime := e.extractor.StartTime.Format(plannercore.MetricTableTimeFormat) | ||
endTime := e.extractor.EndTime.Format(plannercore.MetricTableTimeFormat) | ||
for name, def := range infoschema.MetricTableMap { | ||
sqls := e.genMetricQuerySQLS(name, startTime, endTime, def.Quantile, quantiles, def) |
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 e.genMetricQuerySQLS
method accepts the def
, so I think the def.Quantile
is unnecessary.
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.
great, done.
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.
Rest LGTM
Signed-off-by: crazycs <crazycs520@gmail.com>
LGTM |
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.
LGTM
Signed-off-by: crazycs crazycs520@gmail.com
What problem does this PR solve?
Add the
metrics_summary_by_label
table to query all detail metrics. It is the tablemetrics_summary
by label.This table can quickly help Users to find abnormal metrics in detail between two different times.
eg:
-- compare 2 different time range metrics and order by ratio.
What is changed and how it works?
Check List
Tests