Skip to content

PMM-10385 Explain tab.#1311

Merged
JiriCtvrtka merged 80 commits intomainfrom
PMM-10385-disable-examples
Nov 29, 2022
Merged

PMM-10385 Explain tab.#1311
JiriCtvrtka merged 80 commits intomainfrom
PMM-10385-disable-examples

Conversation

@JiriCtvrtka
Copy link
Copy Markdown
Contributor

@JiriCtvrtka JiriCtvrtka commented Oct 18, 2022

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 18, 2022

Codecov Report

Merging #1311 (36fa97d) into main (f6a6ad3) will increase coverage by 0.36%.
The diff coverage is 43.87%.

@@            Coverage Diff             @@
##             main    #1311      +/-   ##
==========================================
+ Coverage   43.47%   43.84%   +0.36%     
==========================================
  Files         355      354       -1     
  Lines       42053    41683     -370     
==========================================
- Hits        18284    18277       -7     
+ Misses      22174    21810     -364     
- Partials     1595     1596       +1     
Flag Coverage Δ
admin 8.53% <ø> (ø)
agent 53.67% <73.21%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
managed/services/agents/actions.go 0.00% <0.00%> (ø)
managed/services/management/grpc/actions_server.go 0.00% <0.00%> (ø)
managed/services/qan/client.go 81.38% <15.38%> (-1.92%) ⬇️
agent/agents/mysql/perfschema/perfschema.go 49.01% <66.66%> (+0.88%) ⬆️
agent/agents/mysql/slowlog/slowlog.go 51.96% <75.00%> (+0.79%) ⬆️
agent/queryparser/parser.go 78.57% <78.57%> (ø)
managed/services/management/checks.go 74.65% <0.00%> (-1.85%) ⬇️
managed/models/service_helpers.go 60.61% <0.00%> (-0.75%) ⬇️
managed/models/job_models.go 68.42% <0.00%> (ø)
managed/services/agents/jobs.go 0.00% <0.00%> (ø)
... and 9 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Comment thread qan-api2/models/metrics.go Outdated
Comment thread qan-api2/models/data_ingestion.go Outdated
Comment thread qan-api2/models/metrics.go Outdated
@percona percona deleted a comment from github-actions bot Nov 10, 2022
@percona percona deleted a comment from github-actions bot Nov 10, 2022
Comment thread api/managementpb/actions.proto
Comment thread qan-api2/models/metrics.go Outdated
err := s.qanClient.QueryExists(ctx, serviceID, query)
if err != nil {
return err
func (s *ActionsService) StartMySQLExplainAction(ctx context.Context, id, pmmAgentID, serviceID, dsn, query, queryID string, placeholders []string, format agentpb.MysqlExplainOutputFormat, files map[string]string, tdp *models.DelimiterPair, tlsSkipVerify bool) error {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
line is 268 characters (lll)


// makeBuckets is a pure function for easier testing.
func makeBuckets(agentID string, res event.Result, periodStart time.Time, periodLengthSecs uint32, disableQueryExamples bool, maxQueryLength int32) []*agentpb.MetricsBucket { //nolint:cyclop,lll
func makeBuckets(agentID string, res event.Result, periodStart time.Time, periodLengthSecs uint32, disableQueryExamples bool, maxQueryLength int32, l *logrus.Entry) []*agentpb.MetricsBucket {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
line is 191 characters (lll)

@JiriCtvrtka JiriCtvrtka merged commit 404aa71 into main Nov 29, 2022
@JiriCtvrtka JiriCtvrtka deleted the PMM-10385-disable-examples branch November 29, 2022 16:18

// MySQL parse query and return fingeprint and placeholders.
func MySQL(q string) (string, uint32, error) {
normalizedQuery, _, err := sqlparser.Parse2(q)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems like a just query

return "", 0, errors.Wrap(err, "cannot normalize query")
}

parsedQuery := sqlparser.NewParsedQuery(normalizedQuery)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sqlparser.String would return the query we need

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants