Skip to content

Commit

Permalink
Merge pull request #269 from bogdandrutu/importupstream
Browse files Browse the repository at this point in the history
Import the latest micrometer signalfx registry from upstream
  • Loading branch information
breedx-splk authored Aug 26, 2022
2 parents 06ca2d6 + 0ce39b5 commit 57e39fb
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ final class SignalfxDistributionSummary extends AbstractDistributionSummary {
super(id, clock, CumulativeHistogramConfigUtil.updateConfig(distributionStatisticConfig), scale, false);
this.countTotal = new StepTuple2<>(clock, stepMillis, 0L, 0.0, count::sumThenReset, total::sumThenReset);
this.max = new TimeWindowMax(clock, distributionStatisticConfig);
if (!distributionStatisticConfig.isPublishingPercentiles()
&& distributionStatisticConfig.isPublishingHistogram() && isDelta) {
if (distributionStatisticConfig.isPublishingHistogram() && isDelta) {
deltaHistogramCounts = new DeltaHistogramCounts();
}
else {
Expand Down Expand Up @@ -106,12 +105,10 @@ public HistogramSnapshot takeSnapshot() {
if (deltaHistogramCounts == null) {
return currentSnapshot;
}
return new HistogramSnapshot(currentSnapshot.count(), // Already delta in sfx
// implementation
return new HistogramSnapshot(currentSnapshot.count(), // Already delta in sfx implementation
currentSnapshot.total(), // Already delta in sfx implementation
currentSnapshot.max(), // Max cannot be calculated as delta, keep the
// current.
null, // No percentile values
currentSnapshot.max(), // Max cannot be calculated as delta, keep the current.
currentSnapshot.percentileValues(), // No changes to the percentile values.
deltaHistogramCounts.calculate(currentSnapshot.histogramCounts()), currentSnapshot::outputSummary);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ final class SignalfxTimer extends AbstractTimer {
baseTimeUnit, false);
countTotal = new StepTuple2<>(clock, stepMillis, 0L, 0L, count::sumThenReset, total::sumThenReset);
max = new TimeWindowMax(clock, distributionStatisticConfig);
if (!distributionStatisticConfig.isPublishingPercentiles()
&& distributionStatisticConfig.isPublishingHistogram() && isDelta) {
if (distributionStatisticConfig.isPublishingHistogram() && isDelta) {
deltaHistogramCounts = new DeltaHistogramCounts();
}
else {
Expand Down Expand Up @@ -110,12 +109,10 @@ public HistogramSnapshot takeSnapshot() {
if (deltaHistogramCounts == null) {
return currentSnapshot;
}
return new HistogramSnapshot(currentSnapshot.count(), // Already delta in sfx
// implementation
return new HistogramSnapshot(currentSnapshot.count(), // Already delta in sfx implementation
currentSnapshot.total(), // Already delta in sfx implementation
currentSnapshot.max(), // Max cannot be calculated as delta, keep the
// current.
null, // No percentile values
currentSnapshot.max(), // Max cannot be calculated as delta, keep the current.
currentSnapshot.percentileValues(), // No changes to the percentile values.
deltaHistogramCounts.calculate(currentSnapshot.histogramCounts()), currentSnapshot::outputSummary);
}
}
Loading

0 comments on commit 57e39fb

Please sign in to comment.