File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed
ddtrace/profiling/exporter Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,9 @@ class _PprofConverter(object):
252252 ),
253253 )
254254
255- self ._location_values[location_key][" alloc-samples" ] = sum (event.nevents for event in events)
255+ self ._location_values[location_key][" alloc-samples" ] = round (
256+ sum (event.nevents * (event.capture_pct / 100.0 ) for event in events)
257+ )
256258 self ._location_values[location_key][" alloc-space" ] = round (
257259 sum (event.size / event.capture_pct * 100.0 for event in events)
258260 )
Original file line number Diff line number Diff line change 1+ ---
2+ fixes :
3+ - |
4+ Fixes wrong numbers of memory allocation being reported in the memory profiler.
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ sample {
152152 value: 0
153153 value: 0
154154 value: 0
155- value: 3072
155+ value: 2294
156156 value: 104
157157 value: 58
158158 label {
@@ -414,7 +414,7 @@ sample {
414414 value: 0
415415 value: 0
416416 value: 0
417- value: 1024
417+ value: 512
418418 value: 680
419419 value: 340
420420 label {
@@ -582,7 +582,7 @@ sample {
582582 value: 0
583583 value: 0
584584 value: 0
585- value: 2048
585+ value: 1024
586586 value: 136
587587 value: 68
588588 label {
@@ -750,7 +750,7 @@ sample {
750750 value: 0
751751 value: 0
752752 value: 0
753- value: 1024
753+ value: 338
754754 value: 133
755755 value: 44
756756 label {
You can’t perform that action at this time.
0 commit comments