Skip to content

Commit

Permalink
increment with the received value (#785)
Browse files Browse the repository at this point in the history
Co-authored-by: José Carlos Montañez <jc@MacBook-Pro-2.station>
  • Loading branch information
Montagon and José Carlos Montañez authored Sep 4, 2024
1 parent 220981e commit 1a243ce
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()}" }
}

Expand Down

0 comments on commit 1a243ce

Please sign in to comment.