@Override void incrementCountAtIndex(final int index) { counts.getAndIncrement(index); }
protected static long getAndIncrementValue(AtomicLongArray elements, int index) { return elements.getAndIncrement(calcValueOffset(index)); } }
@Override public void addResponseTime(String name, int priorityLevel, int queueTime, int processingTime) { responseTimeCountInCurrWindow.getAndIncrement(priorityLevel); responseTimeTotalInCurrWindow.getAndAdd(priorityLevel, queueTime+processingTime); if (LOG.isDebugEnabled()) { LOG.debug("addResponseTime for call: {} priority: {} queueTime: {} " + "processingTime: {} ", name, priorityLevel, queueTime, processingTime); } }
@Override void incrementCountAtIndex(final int index) { counts.getAndIncrement(index); }
@Override void incrementCountAtIndex(final int index) { counts.getAndIncrement(index); }
@Override void incrementCountAtIndex(final int index) { counts.getAndIncrement(index); }
@Override public void addResponseTime(String name, int priorityLevel, int queueTime, int processingTime) { responseTimeCountInCurrWindow.getAndIncrement(priorityLevel); responseTimeTotalInCurrWindow.getAndAdd(priorityLevel, queueTime+processingTime); if (LOG.isDebugEnabled()) { LOG.debug("addResponseTime for call: {} priority: {} queueTime: {} " + "processingTime: {} ", name, priorityLevel, queueTime, processingTime); } }
/** * Increments the count of the bucket closest to n, rounding UP. * * @param value the data point to add to the histogram */ public void update(long value) { long now = clock.getTime(); rescaleIfNeeded(now); int index = Arrays.binarySearch(bucketOffsets, value); if (index < 0) { // inexact match, take the first bucket higher than n index = -index - 1; } // else exact match; we're good lockForRegularUsage(); try { decayingBuckets.getAndAdd(index, Math.round(forwardDecayWeight(now))); } finally { unlockForRegularUsage(); } buckets.getAndIncrement(index); }
/** * Increments the count of the bucket closest to n, rounding UP. * * @param value the data point to add to the histogram */ public void update(long value) { long now = clock.getTime(); rescaleIfNeeded(now); int index = Arrays.binarySearch(bucketOffsets, value); if (index < 0) { // inexact match, take the first bucket higher than n index = -index - 1; } // else exact match; we're good lockForRegularUsage(); try { decayingBuckets.getAndAdd(index, Math.round(forwardDecayWeight(now))); } finally { unlockForRegularUsage(); } buckets.getAndIncrement(index); }
/** * Increments the count of the bucket closest to n, rounding UP. * * @param value the data point to add to the histogram */ public void update(long value) { long now = clock.getTime(); rescaleIfNeeded(now); int index = Arrays.binarySearch(bucketOffsets, value); if (index < 0) { // inexact match, take the first bucket higher than n index = -index - 1; } // else exact match; we're good lockForRegularUsage(); try { decayingBuckets.getAndAdd(index, Math.round(forwardDecayWeight(now))); } finally { unlockForRegularUsage(); } buckets.getAndIncrement(index); }
/** * Increments the count of the bucket closest to n, rounding UP. * * @param value the data point to add to the histogram */ public void update(long value) { long now = clock.getTime(); rescaleIfNeeded(now); int index = Arrays.binarySearch(bucketOffsets, value); if (index < 0) { // inexact match, take the first bucket higher than n index = -index - 1; } // else exact match; we're good lockForRegularUsage(); try { decayingBuckets.getAndAdd(index, Math.round(forwardDecayWeight(now))); } finally { unlockForRegularUsage(); } buckets.getAndIncrement(index); }
if (receivedMessage != null) { final int receivedConsumerIndex = receivedMessage.readInt(); receivedMessages.getAndIncrement(receivedConsumerIndex); messagesRecieved.incrementAndGet();