Skip to content

Commit 1d9f7ef

Browse files
committed
pr review
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
1 parent 1108e50 commit 1d9f7ef

File tree

1 file changed

+1
-7
lines changed
  • prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics

1 file changed

+1
-7
lines changed

prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/SlidingWindow.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,7 @@
2020
* are synchronized, which ensures thread-safe access to the ring buffer and rotation logic.
2121
*
2222
* <p><b>Performance Note:</b> The synchronized approach may cause contention under high-frequency
23-
* observations. Potential optimizations include:
24-
*
25-
* <ul>
26-
* <li>Using {@link java.util.concurrent.locks.ReadWriteLock} to allow concurrent observations
27-
* <li>Using lock-free data structures with {@link java.util.concurrent.atomic atomic} operations
28-
* <li>Implementing a lock-free ring buffer with striped buckets
29-
* </ul>
23+
* observations.
3024
*
3125
* <p>However, given that Summary metrics are less commonly used (Histogram is generally preferred),
3226
* and the observation frequency is typically lower than Counter increments, the current

0 commit comments

Comments
 (0)