-
Notifications
You must be signed in to change notification settings - Fork 148
PMM-12548 Slowlog as new MongoDB query source. #3776
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
base: v3
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v3 #3776 +/- ##
==========================================
- Coverage 43.67% 43.49% -0.18%
==========================================
Files 369 370 +1
Lines 45189 45372 +183
==========================================
- Hits 19737 19736 -1
- Misses 23744 23927 +183
- Partials 1708 1709 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
}, | ||
}, | ||
) | ||
database.Collection("secondcollection").Aggregate(ctx, mongo.Pipeline{ |
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.
🚫 [golangci] reported by reviewdog 🐶
Error return value of (*go.mongodb.org/mongo-driver/mongo.Collection).Aggregate
is not checked (errcheck)
return fp, nil | ||
} | ||
|
||
// Helper for insert operations |
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.
🚫 [golangci] reported by reviewdog 🐶
Comment should end in a period (godot)
return fp, nil | ||
} | ||
|
||
// Helper for update operations |
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.
🚫 [golangci] reported by reviewdog 🐶
Comment should end in a period (godot)
return fp, nil | ||
} | ||
|
||
// Helper for delete operations |
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.
🚫 [golangci] reported by reviewdog 🐶
Comment should end in a period (godot)
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package report |
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.
🚫 [golangci] reported by reviewdog 🐶
package-comments: should have a package comment (revive)
} | ||
|
||
// Start starts analyzer but doesn't wait until it exits | ||
func (l *mongolog) Start() error { |
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.
🚫 [golangci] reported by reviewdog 🐶
ST1016: methods on the same type should have the same receiver name (seen 1x "l", 1x "s") (stylecheck)
|
||
result := aggregator.createResult(ctx) | ||
|
||
require.Equal(t, 1, len(result.Buckets)) |
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.
🚫 [golangci] reported by reviewdog 🐶
len: use require.Len (testifylint)
assert.Equal(t, expected.StartTs, actual.StartTs) | ||
assert.Equal(t, expected.EndTs, actual.EndTs) | ||
assert.Len(t, actual.Buckets, 1) | ||
assert.EqualValues(t, actual.Buckets[0].Common.NumQueries, 1) |
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.
🚫 [golangci] reported by reviewdog 🐶
float-compare: use assert.InEpsilon (or InDelta) (testifylint)
ctr.Stop() | ||
} | ||
|
||
func countLinesInFile(t *testing.T, filePath string) int { |
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.
🚫 [golangci] reported by reviewdog 🐶
test helper function should start from t.Helper() (thelper)
|
||
// AddAgentQANMongoDBMongologAgentCommand is used by Kong for CLI flags and commands. | ||
// | ||
//nolint:lll |
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.
🚫 [golangci] reported by reviewdog 🐶
directive //nolint:lll
is unused for linter "lll" (nolintlint)
PMM-12548
Link to the Feature Build: SUBMODULES-0