From f6bfe0dbb6a7665c02dc918a428ed6ad9bf09dc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Monta=C3=B1ez?= Date: Wed, 4 Sep 2024 16:46:31 +0200 Subject: [PATCH] increment with the received value --- .../com/xebia/functional/xef/metrics/InMemoryCounterMetric.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/commonMain/kotlin/com/xebia/functional/xef/metrics/InMemoryCounterMetric.kt b/core/src/commonMain/kotlin/com/xebia/functional/xef/metrics/InMemoryCounterMetric.kt index 7cd302fb3..cd9359813 100644 --- a/core/src/commonMain/kotlin/com/xebia/functional/xef/metrics/InMemoryCounterMetric.kt +++ b/core/src/commonMain/kotlin/com/xebia/functional/xef/metrics/InMemoryCounterMetric.kt @@ -7,7 +7,7 @@ class InMemoryCounterMetric(val name: String, val logger: KLogger) : CounterMetr private val count = AtomicLong(0) override fun increment(n: Long) { - count.incrementAndGet() + count.addAndGet(n) logger.info { "Counter $name incremented to ${count.get()}" } }