diff --git a/micrometer-core/src/main/java/io/micrometer/core/instrument/logging/LoggingMeterRegistry.java b/micrometer-core/src/main/java/io/micrometer/core/instrument/logging/LoggingMeterRegistry.java index 677a67c79..75f6111e8 100644 --- a/micrometer-core/src/main/java/io/micrometer/core/instrument/logging/LoggingMeterRegistry.java +++ b/micrometer-core/src/main/java/io/micrometer/core/instrument/logging/LoggingMeterRegistry.java @@ -152,9 +152,9 @@ protected void publish() { return; HistogramSnapshot snapshot = longTaskTimer.takeSnapshot(); loggingSink.accept(print.id() + " active=" + wholeOrDecimal(activeTasks) + " duration=" - + print.time(longTaskTimer.duration(getBaseTimeUnit())) + " throughput=" - + print.unitlessRate(activeTasks) + " mean=" + print.time(snapshot.mean(getBaseTimeUnit())) - + " max=" + print.time(snapshot.max(getBaseTimeUnit()))); + + print.time(longTaskTimer.duration(getBaseTimeUnit())) + " mean=" + + print.time(snapshot.mean(getBaseTimeUnit())) + " max=" + + print.time(snapshot.max(getBaseTimeUnit()))); }, timeGauge -> { double value = timeGauge.value(getBaseTimeUnit()); if (!config.logInactive() && value == 0) diff --git a/micrometer-core/src/test/java/io/micrometer/core/instrument/logging/LoggingMeterRegistryTest.java b/micrometer-core/src/test/java/io/micrometer/core/instrument/logging/LoggingMeterRegistryTest.java index 6b36af997..cd90cbaf3 100644 --- a/micrometer-core/src/test/java/io/micrometer/core/instrument/logging/LoggingMeterRegistryTest.java +++ b/micrometer-core/src/test/java/io/micrometer/core/instrument/logging/LoggingMeterRegistryTest.java @@ -231,8 +231,7 @@ void publishShouldPrintActiveCountAndDurationWhenMeterIsLongTaskTimer() { IntStream.rangeClosed(1, 30).forEach(t -> timer.start()); clock.add(config.step()); recordingRegistry.publish(); - assertThat(recordingRegistry.getLogs()) - .containsExactly("my.ltt{} active=30 duration=30m throughput=0.5/s mean=1m max=1m"); + assertThat(recordingRegistry.getLogs()).containsExactly("my.ltt{} active=30 duration=30m mean=1m max=1m"); } @Test