Add perf_schema quantile columns to collector #897
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change appends the 3 quantile columns exposed in the
events_statements_summary_by_digest
table to theperf_schema_events_statements
collector so that they are available as a summary metric.We believe this to be a useful addition so that the various quantiles (p95, p99, p99.5) are available to query and spot changes in performance for a given query. Our use case is to visualise these quantiles for a specific digest to provide more insight than just average query times.
The new summary metric
mysql_perf_schema_events_statements_latency
has 3 quantiles: 95, 99, 99.5 and in addition has asum
andcount
metric that matches the values ofevents_statements_seconds_total
andevents_statements_total
respectively. These metrics may be considered redundant with this addition.There is mention of adding quantiles in a previous change from a colleague here which wasn't further investigated.
Sample
/metrics
output that includes the new metrics: