public void setNoMoreMessages(SystemStreamPartition systemStreamPartition, boolean noMoreMessages) { this.noMoreMessageGaugeMap.get(systemStreamPartition).set(noMoreMessages); }
@Override public <T> Gauge<T> newGauge(String group, String name, T value) { return new Gauge<T>(name, value); }
counter3.inc(4); gauge1.set("5"); gauge2.set("6"); gauge3.set("7"); gauge4.set("8"); assertEquals(2, counter2.getCount()); assertEquals(4, counter3.getCount()); assertEquals("5", gauge1.getValue()); assertEquals("6", gauge2.getValue()); assertEquals("7", gauge3.getValue()); assertEquals("8", gauge4.getValue()); assertEquals(1, timer1.getSnapshot().getAverage(), 0); assertEquals(2, timer2.getSnapshot().getAverage(), 0);
public void setNoMoreMessages(SystemStreamPartition systemStreamPartition, boolean noMoreMessages) { this.noMoreMessageGaugeMap.get(systemStreamPartition).set(noMoreMessages); }
@Override public <T> Gauge<T> newGauge(String group, String name, T value) { return new Gauge<T>(name, value); }
/** * Insert an PendingEnvelope into the pending envelope queue. * The function will be called in the run loop thread so no synchronization. * @param pendingEnvelope */ private void insertEnvelope(PendingEnvelope pendingEnvelope) { pendingEnvelopeQueue.add(pendingEnvelope); int queueSize = pendingEnvelopeQueue.size(); taskMetrics.pendingMessages().set(queueSize); log.trace("Insert envelope to task {} queue.", taskName); log.debug("Task {} pending envelope count is {} after insertion.", taskName, queueSize); }
public <T> Gauge<T> newGauge(String name, T value) { return registry.newGauge(groupName, new Gauge<T>((prefix + name).toLowerCase(), value)); }
/** * Insert an PendingEnvelope into the pending envelope queue. * The function will be called in the run loop thread so no synchronization. * @param pendingEnvelope */ private void insertEnvelope(PendingEnvelope pendingEnvelope) { pendingEnvelopeQueue.add(pendingEnvelope); int queueSize = pendingEnvelopeQueue.size(); taskMetrics.pendingMessages().set(queueSize); log.trace("Insert envelope to task {} queue.", taskName); log.debug("Task {} pending envelope count is {} after insertion.", taskName, queueSize); }
public <T> Gauge<T> newGauge(String name, T value) { return registry.newGauge(groupName, new Gauge<T>((prefix + name).toLowerCase(), value)); }
/** * Insert an PendingEnvelope into the pending envelope queue. * The function will be called in the run loop thread so no synchronization. * @param pendingEnvelope */ private void insertEnvelope(PendingEnvelope pendingEnvelope) { pendingEnvelopeQueue.add(pendingEnvelope); int queueSize = pendingEnvelopeQueue.size(); taskMetrics.pendingMessages().set(queueSize); log.trace("Insert envelope to task {} queue.", taskName); log.debug("Task {} pending envelope count is {} after insertion.", taskName, queueSize); }
public <T> Gauge<T> newGauge(String name, T value) { return registry.newGauge(groupName, new Gauge<T>((prefix + name).toLowerCase(), value)); }
private void startProcess() { int count = messagesInFlight.incrementAndGet(); taskMetrics.messagesInFlight().set(count); }
public <T> Gauge<T> newGauge(String name, T value) { return registry.newGauge(groupName, new Gauge<T>((prefix + name).toLowerCase(), value)); }
/** * Insert an PendingEnvelope into the pending envelope queue. * The function will be called in the run loop thread so no synchronization. * @param pendingEnvelope */ private void insertEnvelope(PendingEnvelope pendingEnvelope) { pendingEnvelopeQueue.add(pendingEnvelope); int queueSize = pendingEnvelopeQueue.size(); taskMetrics.pendingMessages().set(queueSize); log.trace("Insert envelope to task {} queue.", taskName); log.debug("Task {} pending envelope count is {} after insertion.", taskName, queueSize); }
public <T> Gauge<T> newGauge(String name, T value) { return registry.newGauge(groupName, new Gauge<T>((prefix + name).toLowerCase(), value)); }
/** * Insert an PendingEnvelope into the pending envelope queue. * The function will be called in the run loop thread so no synchronization. * @param pendingEnvelope */ private void insertEnvelope(PendingEnvelope pendingEnvelope) { pendingEnvelopeQueue.add(pendingEnvelope); int queueSize = pendingEnvelopeQueue.size(); taskMetrics.pendingMessages().set(queueSize); log.trace("Insert envelope to task {} queue.", taskName); log.debug("Task {} pending envelope count is {} after insertion.", taskName, queueSize); }
public <T> Gauge<T> newGauge(String name, final ValueFunction<T> valueFunc) { return registry.newGauge(groupName, new Gauge<T>((prefix + name).toLowerCase(), valueFunc.getValue()) { @Override public T getValue() { return valueFunc.getValue(); } }); }
private void doneProcess() { int count = messagesInFlight.decrementAndGet(); taskMetrics.messagesInFlight().set(count); }
public <T> Gauge<T> newGauge(String name, final ValueFunction<T> valueFunc) { return registry.newGauge(groupName, new Gauge<T>((prefix + name).toLowerCase(), valueFunc.getValue()) { @Override public T getValue() { return valueFunc.getValue(); } }); }