Skip to content

Commit

Permalink
errorprone: LongDoubleConversion - suppress in MetricsFormatter
Browse files Browse the repository at this point in the history
  • Loading branch information
jpdahlke committed Sep 1, 2024
1 parent c2ce2fb commit 9134702
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/emissary/core/MetricsFormatter.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

/**
* Formatter for metrics data, following the existing format emissary format, established previously. Employs the
* builder pattern of the Reporters from coda hale's metrics package. Currently supports Timers, but could be expanded
* to support any number of metrics classes.
* builder pattern of the Reporters from the coda hale metrics package. This currently supports Timers, but could be
* expanded to support any number of metrics classes.
*/
public class MetricsFormatter {
/** Create a builder */
Expand Down Expand Up @@ -45,6 +45,7 @@ private MetricsFormatter(final TimeUnit rateUnit, final TimeUnit durationUnit) {
this.durationFactor = 1.0 / durationUnit.toNanos(1);
}

@SuppressWarnings("LongDoubleConversion")
public String formatTimer(final String name, final Timer timer) {
final Snapshot snapshot = timer.getSnapshot();
return String.format("STAT: %s => min=%2.2f, max=%2.2f, avg=%2.2f, events=%d", name, convertDuration(snapshot.getMin()),
Expand Down

0 comments on commit 9134702

Please sign in to comment.