-
Notifications
You must be signed in to change notification settings - Fork 13
Add poisson upscaling without storing count in the sample types #908
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
Conversation
7bb80e6
to
f761446
Compare
BenchmarksComparisonBenchmark execution time: 2025-03-06 08:19:09 Comparing candidate commit b8ed15a in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 52 metrics, 2 unstable metrics. CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
Group 13
BaselineOmitted due to size. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #908 +/- ##
=======================================
Coverage 72.21% 72.21%
=======================================
Files 330 330
Lines 49065 49128 +63
=======================================
+ Hits 35430 35480 +50
- Misses 13635 13648 +13
🚀 New features to boost your workflow:
|
f761446
to
797805b
Compare
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.
I have a code style suggestion that clippy would probably give too. Aside from that, it looks fine to me, although I did not check the upscaling math--maybe someone more familiar can look at it.
} => write!( | ||
f, | ||
"Poisson = sum_value_offset: {}, count_value: {}, sampling_distance: {}", | ||
sum_value_offset, count_value, sampling_distance | ||
), |
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.
Clippy would probably suggest this:
} => write!( | |
f, | |
"Poisson = sum_value_offset: {}, count_value: {}, sampling_distance: {}", | |
sum_value_offset, count_value, sampling_distance | |
), | |
} => write!( | |
f, | |
"Poisson = sum_value_offset: {sum_value_offset}, count_value: {count_value}, sampling_distance: {sampling_distance}" | |
), |
(or something close, writing code in a text box in a browser is hard)
This kind of thing is repeated a few times in this file (in and out of the PR).
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.
Interestingly clippy does not complain, but I see value in the proposed change.
I'd tend keep it as is for consistency reasons and clean up all of this in follow-up PR, WDYT?
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.
See #913
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.
LGTM
* Add poisson upscaling without storing count in the sample types (#908) * prepare v15.1.0
What does this PR do?
So far our poisson upscaling relied on the count of samples to be part of the sample data. This works fine for sample types where we also collect the count, like memory allocations, where we collect the
alloc-size
andalloc-count
. In that case we can just use thealloc-count
from the samples collected. In some cases, like I/O profiling, we add a lot of sample types (socket/file read/write times/bytes) but also adding the count for all of these operations would just bloat the resulting pprof, without a lot of value, so we need a way to inject the count to calculate the scale without having it in a sample type. This PR adds this.Motivation
I/O profiling in PHP is such a feature, where we add 8 sample types already. Adding all the counts would add another 8 sample types for no value (besides upscaling, which we can solve differently).
Additional Notes
v15.1.0
as the PHP profiler is not yet onv16
and I do not want to mix to many things together.clippy
errors are unrelated to the changes in this PRHow to test the change?
DataDog/dd-trace-php#3118