Skip to content

Commit

Permalink
Fix erroneous linear scaling when resampling.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Dullien committed Aug 10, 2023
1 parent 75ec51b commit 5e86f14
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,10 @@ public int adjustSampleCount(int originalCount) {
// Adjust the sample counts from down-sampled to fully sampled.
// Be aware that downsampling drops entries from stackTraceEvents, so that
// the sum of the upscaled count values is less that totalCount.
return (int) Math.floor(newCount / (sampleRate * p));
// Note: In the future, this upsampling needs to take the sample rate into
// account, too, so that *all* scaling of results is done in the ES
// plugin, and no longer in Kibana.
return (int) Math.floor(newCount / p);
} else {
return 0;
}
Expand Down

0 comments on commit 5e86f14

Please sign in to comment.