Skip to content

Commit

Permalink
Added OffsetsSlotsTest
Browse files Browse the repository at this point in the history
  • Loading branch information
szczygiel-m committed Jul 15, 2024
1 parent dccdef8 commit 6538eeb
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 203 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class OffsetsSlots {
public OffsetsSlots(SubscriptionName subscriptionName, MetricsFacade metrics, int inflightQueueSize, int offsetQueueSize) {
this.totalOffsetsCountSemaphore = new Semaphore(offsetQueueSize);
this.inflightSemaphore = new AdjustableSemaphore(inflightQueueSize);
metrics.subscriptions().registerOffsetsQueueGauge(subscriptionName, totalOffsetsCountSemaphore, slots -> (double) slots.availablePermits() / offsetQueueSize);
metrics.subscriptions().registerOffsetsQueueGauge(subscriptionName, totalOffsetsCountSemaphore, slots -> (offsetQueueSize - (double) slots.availablePermits()) / offsetQueueSize);
}

public void setInflightSize(int inflightQueueSize) {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 6538eeb

Please sign in to comment.