Skip to content

Commit

Permalink
Merge branch '1.10.x' into 1.11.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatan-ivanov committed Sep 11, 2023
2 parents 209cc10 + e6e61b0 commit 33c4414
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ protected void recordNonNegative(long amount, TimeUnit unit) {
max.record(nanoAmount, TimeUnit.NANOSECONDS);

if (histogram != null) {
histogram.recordLong(TimeUnit.NANOSECONDS.convert(amount, unit));
histogram.recordLong(nanoAmount);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public FilterReply decide(Marker marker, Logger logger, Level level, String form
// and can return immediately and
// avoid the relatively expensive ThreadLocal access below. See also logbacks
// Logger.callTurboFilters().
// Calling logger.isEnabledFor(level) might be sub-optimal since it cals this
// Calling logger.isEnabledFor(level) might be sub-optimal since it calls this
// filter again. This behavior caused a StackOverflowError in the past.
if (format == null || !level.isGreaterOrEqual(logger.getEffectiveLevel())) {
return FilterReply.NEUTRAL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,10 @@ void outputSummary(PrintStream printStream, double bucketScaling) {

String bucketFormatString = "%14.1f %10d\n";

FixedBoundaryHistogram currentHistogram = currentHistogram();
for (int i = 0; i < buckets.length; i++) {
printStream.format(Locale.US, bucketFormatString, buckets[i] / bucketScaling,
currentHistogram().values.get(i));
currentHistogram.values.get(i));
}

printStream.write('\n');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class StepDistributionSummary extends AbstractDistributionSummary impleme
* Create a new {@code StepDistributionSummary}.
* @param id ID
* @param clock clock
* @param distributionStatisticConfig distribution static configuration
* @param distributionStatisticConfig distribution statistic configuration
* @param scale scale
* @param stepMillis step in milliseconds
* @param supportsAggregablePercentiles whether it supports aggregable percentiles
Expand Down Expand Up @@ -77,7 +77,7 @@ protected StepDistributionSummary(Id id, Clock clock, DistributionStatisticConfi

@Override
protected void recordNonNegative(double amount) {
count.add(1);
count.add(1L);
total.add(amount);
max.record(amount);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected StepTimer(final Id id, final Clock clock, final DistributionStatisticC
@Override
protected void recordNonNegative(final long amount, final TimeUnit unit) {
final long nanoAmount = (long) TimeUtils.convert(amount, unit, TimeUnit.NANOSECONDS);
count.add(1);
count.add(1L);
total.add(nanoAmount);
max.record(nanoAmount);
}
Expand Down

0 comments on commit 33c4414

Please sign in to comment.