Skip to content
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

PMM-9288 Extended profiler. #3662

Merged
merged 42 commits into from
Mar 7, 2025
Merged

PMM-9288 Extended profiler. #3662

merged 42 commits into from
Mar 7, 2025

Conversation

JiriCtvrtka
Copy link
Contributor

@JiriCtvrtka JiriCtvrtka commented Feb 18, 2025

Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.89%. Comparing base (270a542) to head (23f5aab).
Report is 1 commits behind head on v3.

Additional details and impacted files
@@            Coverage Diff             @@
##               v3    #3662      +/-   ##
==========================================
+ Coverage   43.78%   43.89%   +0.10%     
==========================================
  Files         367      367              
  Lines       44538    44627      +89     
==========================================
+ Hits        19503    19591      +88     
  Misses      23353    23353              
- Partials     1682     1683       +1     
Flag Coverage Δ
admin 11.51% <ø> (+0.04%) ⬆️
agent 52.58% <100.00%> (+0.13%) ⬆️
managed 45.46% <100.00%> (+0.09%) ⬆️
vmproxy 73.45% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines -291 to -295
bucket.Mongodb.MDocsScannedCnt = float32(v.Count) // TODO: Check is it right value
bucket.Mongodb.MDocsScannedMax = float32(v.Scanned.Max)
bucket.Mongodb.MDocsScannedMin = float32(v.Scanned.Min)
bucket.Mongodb.MDocsScannedP99 = float32(v.Scanned.Pct99)
bucket.Mongodb.MDocsScannedSum = float32(v.Scanned.Total)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deprecated

@JiriCtvrtka JiriCtvrtka marked this pull request as ready for review February 21, 2025 08:49
@JiriCtvrtka JiriCtvrtka requested review from a team and BupycHuk as code owners February 21, 2025 08:49
@JiriCtvrtka JiriCtvrtka requested review from ademidoff, idoqo and igroene and removed request for a team February 21, 2025 08:49
Comment on lines -304 to +303
bucket.Mongodb.MFullScanSum = float32(v.CollScanSum) / 1000
bucket.Mongodb.MFullScanSum = float32(v.CollScanCount) // Sum is same like count in this case
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@igroene please check if in case of Full Scan (CollScan in Mongo) are Sum and Count values same.

Copy link
Member

Choose a reason for hiding this comment

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

what if we count the distinct number of collscans and use sum for the total number? would it be too complicated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if I understood you correctly, but:

  1. Currently, it is the total sum of the number of collection scans. Is this what you meant?
  2. If you're asking about the total number of all stages, then yes, it would be complicated at this point. To achieve that, we would need to change the way data is collected, which could be done in a separate ticket.

Or did you mean something entirely different?

Copy link
Member

Choose a reason for hiding this comment

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

what I mean is, keep the SUM as the total number of recorded COLSCANS for that particular query shape. Use COUNT for the number of recorded COLSCANS of the particular query shape that have different values for the variables. Assuming we captured the following 4 queries:

db.testcol.find({a:101})
db.testcol.find({a:101})
db.testcol.find({a:200})
db.testcol.find({a:140})

assuming all the above are collscans, SUM would be 4 and COUNT would be 3. Makes sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see. Yes, this should be possible. Let me adjust the code to make it work. Thanks for the explanation.

Copy link
Member

Choose a reason for hiding this comment

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

@JiriCtvrtka current implementation should make it, no adjustment required

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for verifying.

@JiriCtvrtka JiriCtvrtka merged commit b1acbff into v3 Mar 7, 2025
32 checks passed
@JiriCtvrtka JiriCtvrtka deleted the PMM-9288-extended-profiler branch March 7, 2025 11:58
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