void incrementTimeout() { metrics.timeouts.mark(); }
public void incrementDroppedMessages(Verb verb) { assert DROPPABLE_VERBS.contains(verb) : "Verb " + verb + " should not legally be dropped"; droppedMessages.get(verb).dropped.mark(); }
/** * Logs a value to a meter. * * @param meter The meter to use * @param unitCount The number of units to add to the meter * @param reusedMeter The meter to reuse */ public com.yammer.metrics.core.Meter addMeteredGlobalValue(final M meter, final long unitCount, com.yammer.metrics.core.Meter reusedMeter) { if (reusedMeter != null) { reusedMeter.mark(unitCount); return reusedMeter; } else { final String fullMeterName; String meterName = meter.getMeterName(); fullMeterName = _metricPrefix + meterName; final MetricName metricName = new MetricName(_clazz, fullMeterName); final com.yammer.metrics.core.Meter newMeter = MetricsHelper.newMeter(_metricsRegistry, metricName, meter.getUnit(), TimeUnit.SECONDS); newMeter.mark(unitCount); return newMeter; } }
/** * Logs a value to a table-level meter. * @param tableName The table name * @param meter The meter to use * @param unitCount The number of units to add to the meter * @param reusedMeter The meter to reuse */ public com.yammer.metrics.core.Meter addMeteredTableValue(final String tableName, final M meter, final long unitCount, com.yammer.metrics.core.Meter reusedMeter) { if (reusedMeter != null) { reusedMeter.mark(unitCount); return reusedMeter; } else { final String fullMeterName; String meterName = meter.getMeterName(); fullMeterName = _metricPrefix + getTableName(tableName) + "." + meterName; final MetricName metricName = new MetricName(_clazz, fullMeterName); final com.yammer.metrics.core.Meter newMeter = MetricsHelper.newMeter(_metricsRegistry, metricName, meter.getUnit(), TimeUnit.SECONDS); newMeter.mark(unitCount); return newMeter; } }
/** * Logs a value to a meter for a specific query. * * @param request The broker request associated with this query * @param meter The meter to use * @param unitCount The number of units to add to the meter */ public void addMeteredQueryValue(final BrokerRequest request, final M meter, final long unitCount) { final String fullMeterName; String meterName = meter.getMeterName(); if (request != null) { fullMeterName = buildMetricName(request, meterName); } else { fullMeterName = _metricPrefix + meterName; } final MetricName metricName = new MetricName(_clazz, fullMeterName); MetricsHelper.newMeter(_metricsRegistry, metricName, meter.getUnit(), TimeUnit.SECONDS).mark(unitCount); }
/** * Mark the occurrence of an event. */ public void mark() { mark(1); }
@Override public void onFailedCheck() { this.failedCheckMeter.mark(); } }
@Override public Object invoke(MethodInvocation invocation) throws Throwable { meter.mark(); return invocation.proceed(); } }
public int get(String host) { try { return meshCache.get(host); } catch (Exception e) { log.warn("unknown problem loading score for {}", host, e); // If an unexpected error occurs, say that the host has about 50 open files as a safe case loadProblems.mark(); return 50; } } }
private void incrementDroppedMessages(DroppedMessages droppedMessages, boolean isCrossNodeTimeout) { droppedMessages.metrics.dropped.mark(); if (isCrossNodeTimeout) droppedMessages.droppedCrossNodeTimeout.incrementAndGet(); else droppedMessages.droppedInternalTimeout.incrementAndGet(); }
public QueryEngineDirectory(DataTree tree, String dir) { super(tree); this.dir = dir; currentlyOpenEngines.inc(); engineCreations.mark(); //Metric for total trees/engines initialized }
@Override public QueryEngine load(String dir) throws Exception { QueryEngine qe = newQueryEngineDirectory(dir); newEnginesOpened.mark(); return qe; }
private void update(long duration) { if (duration >= 0) { histogram.update(duration); meter.mark(); } }
private void retryDeletesIndividually(List<String> idsToDelete) throws SolrServerException, IOException { for (String idToDelete : idsToDelete) { try { solrServer.deleteById(idToDelete); indexDeleteMeter.mark(); } catch (SolrException e) { logOrThrowSolrException(e); // No exception thrown through, so we can update the metric documentDeleteErrorMeter.mark(); } } }
private void retryDeletesIndividually(int shard, List<String> idsToDelete) throws SolrServerException, IOException { for (String idToDelete : idsToDelete) { try { solrServers.get(shard).deleteById(idToDelete); indexDeleteMeter.mark(); } catch (SolrException e) { logOrThrowSolrException(e); // No exception thrown through, so we can update the metric documentDeleteErrorMeter.mark(); } } }
@Override public void dispatch(Object resource, HttpContext httpContext) { meter.mark(); underlying.dispatch(resource, httpContext); } }
private void retryDeletesIndividually(int shard, List<String> idsToDelete) throws SolrServerException, IOException { for (String idToDelete : idsToDelete) { try { solrServers.get(shard).deleteById(idToDelete); indexDeleteMeter.mark(); } catch (SolrException e) { logOrThrowSolrException(e); // No exception thrown through, so we can update the metric documentDeleteErrorMeter.mark(); } } }
@Override public void handleIndexingEvent(IndexingEvent evt) { if (evt instanceof IndexUpdatedEvent) { IndexingMetrics metrics = SenseiZoieSystemFactory.this.metricsMap.get(partitionId); IndexUpdatedEvent updateEvent = (IndexUpdatedEvent) evt; metrics.docsIndexedMetric.mark(updateEvent.getNumDocsIndexed()); metrics.docsLeftoverMetric.mark(updateEvent.getNumDocsLeftInQueue()); metrics.flushTimeHistogram.update(updateEvent.getEndIndexingTime() - updateEvent.getStartIndexingTime()); } } });