PMM-15133 Re-design QANService for better performance#5463
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## v3 #5463 +/- ##
==========================================
+ Coverage 43.13% 43.30% +0.17%
==========================================
Files 413 414 +1
Lines 42394 42650 +256
==========================================
+ Hits 18287 18470 +183
- Misses 22235 22279 +44
- Partials 1872 1901 +29
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
percona-robot
left a comment
There was a problem hiding this comment.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golangci
🚫 [golangci] reported by reviewdog 🐶
named return "planid" with type "string" found (nonamedreturns)
pmm/qan/models/object_details.go
Line 117 in 08d6d9c
🚫 [golangci] reported by reviewdog 🐶
named return "sum" with type "float64" found (nonamedreturns)
Line 167 in 08d6d9c
🚫 [golangci] reported by reviewdog 🐶
named return "lo" with type "float64" found (nonamedreturns)
pmm/utils/ddsketch/ddsketch.go
Line 77 in 08d6d9c
🚫 [golangci] reported by reviewdog 🐶
exported: exported const MaxValue should have comment (or a comment on this block) or be unexported (revive)
pmm/utils/ddsketch/ddsketch.go
Line 31 in 08d6d9c
🚫 [golangci] reported by reviewdog 🐶
float-compare: use require.InEpsilon (or InDelta) (testifylint)
pmm/qan/models/ingestion_integration_test.go
Line 105 in 08d6d9c
🚫 [golangci] reported by reviewdog 🐶
float-compare: use assert.InEpsilon (or InDelta) (testifylint)
pmm/qan/models/ingestion_test.go
Line 42 in 08d6d9c
🚫 [golangci] reported by reviewdog 🐶
float-compare: use assert.InEpsilon (or InDelta) (testifylint)
pmm/qan/models/ingestion_test.go
Line 43 in 08d6d9c
🚫 [golangci] reported by reviewdog 🐶
len: use require.Len (testifylint)
pmm/utils/ddsketch/ddsketch_test.go
Line 43 in 08d6d9c
🚫 [golangci] reported by reviewdog 🐶
float-compare: use assert.InEpsilon (or InDelta) (testifylint)
pmm/utils/ddsketch/ddsketch_test.go
Line 95 in 08d6d9c
🚫 [golangci] reported by reviewdog 🐶
float-compare: use require.InEpsilon (or InDelta) (testifylint)
pmm/utils/ddsketch/ddsketch_test.go
Line 106 in 08d6d9c
🚫 [golangci] reported by reviewdog 🐶
float-compare: use require.InEpsilon (or InDelta) (testifylint)
pmm/utils/ddsketch/ddsketch_test.go
Line 107 in 08d6d9c
🚫 [golangci] reported by reviewdog 🐶
(*Service).GetMetricsNames - result 1 (error) is always nil (unparam)
| const ( | ||
| dedupTTL = 3 * time.Minute | ||
| maxDedupEntries = 500000 | ||
| // dedupHighWater is the size the cache is trimmed back to once it reaches the |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
Sentence should start with a capital letter (godot)
| ctx := t.Context() | ||
| ing := NewIngestor(conn) | ||
| rep := NewReporter(conn) | ||
| base := uint32(time.Now().UTC().Truncate(time.Hour).Add(-time.Hour).Unix()) |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
G115: integer overflow conversion int64 -> uint32 (gosec)
| } | ||
| out = append(out, &qanv1.Point{ | ||
| Point: point, | ||
| TimeFrame: uint32(tf), |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
G115: integer overflow conversion int64 -> uint32 (gosec)
| "`database`", "`schema`", "username", "client_host", | ||
| "cluster", "environment", "replication_set", "node_id", "node_name", "az", "region", "container_name", | ||
| "cmd_type", "agent_id", "agent_type", "labels", | ||
| "fingerprint", "tables", "explain_fingerprint", "placeholders_count", "example", "example_metrics", "query_plan", "planid", "plan_summary", "is_truncated", "example_type", |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
The line is 175 characters long, which exceeds the maximum of 170 characters. (lll)
| mb.Database, mb.Schema, mb.Username, mb.ClientHost, | ||
| mb.Cluster, mb.Environment, mb.ReplicationSet, mb.NodeId, mb.NodeName, mb.Az, mb.Region, mb.ContainerName, | ||
| mb.CmdType, mb.AgentId, mb.AgentType.String(), labels, | ||
| mb.Fingerprint, tables, mb.ExplainFingerprint, mb.PlaceholdersCount, mb.Example, mb.ExampleMetrics, mb.QueryPlan, mb.Planid, mb.PlanSummary, boolToUint8(mb.IsTruncated), mb.ExampleType.String(), |
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
The line is 202 characters long, which exceeds the maximum of 170 characters. (lll)
Ticket number: PMM-15133
Feature build: SUBMODULES-4395