/** * Report that a filtered SEP operation has been processed. This method should only be called to * report SEP operations that have been processed after making it through the filtering process. * * @param duration The number of millisecods spent handling the SEP operation */ public void reportFilteredSepOperation(long duration) { sepProcessingRate.inc(duration); }
/** * Increment the metrics for numOps operations * @param time - time for numOps operations */ @Override public synchronized void inc(final long time) { super.inc(time); ++totalOps; }
/** * Report that a filtered SEP operation has been processed. This method should only be called to * report SEP operations that have been processed after making it through the filtering process. * * @param duration The number of millisecods spent handling the SEP operation */ public void reportFilteredSepOperation(long duration) { sepProcessingRate.inc(duration); }
/** * Increment the metrics for numOps operations * @param numOps - number of operations * @param time - time for numOps operations */ @Override public synchronized void inc(final int numOps, final long time) { super.inc(numOps, time); totalOps += numOps; }
public void incNumRowKeysInBatchGet(int diff) { numRowKeysInBatchGet.inc(diff); }
private void addHLogMetric(HLog.Metric logMetric, MetricsTimeVaryingRate hadoopMetric) { if (logMetric.count > 0) hadoopMetric.inc(logMetric.min); if (logMetric.count > 1) hadoopMetric.inc(logMetric.max); if (logMetric.count > 2) { int ops = logMetric.count - 2; hadoopMetric.inc(ops, logMetric.total - logMetric.max - logMetric.min); } }
@Override public synchronized void addTaskLaunchMsecs(long msecs) { taskLaunchMsecs.inc(msecs); }
public synchronized void incReadTime(long value) { readLatency.inc(value); }
public synchronized void incPreadTime(long value) { preadLatency.inc(value); }
public synchronized void incSyncTime(long value) { syncLatency.inc(value); }
void report(Action action, long duration) { rates.get(action).inc(duration); }
void report(Action action, long duration) { rates.get(action).inc(duration); }
void reportHBase(HBaseAction action, long duration) { hbaseRates.get(action).inc(duration); }
void report(Action action, long duration) { rates.get(action).inc(duration); if (action != Action.READ) { lastMutationEventTimestamp.set(System.currentTimeMillis()); } }
public void inc(String name, int amt) { MetricsTimeVaryingRate m = get(name); if (m == null) { LOG.warn("Got inc() request for method that doesnt exist: " + name); return; // ignore methods that dont exist. } m.inc(amt); }
public static void updateLatency(MetricsTimeVaryingRate metric, long beginTs, boolean logSlowOp, String message) { long consumeInUs = (System.nanoTime() - beginTs) / 1000; metric.inc(consumeInUs); if (logSlowOp) { logSlowOperationInternal(metric.getName(), consumeInUs, message); } }
public synchronized void incrTimeVaryingMetric( String name, long amt, int numOps) { MetricsTimeVaryingRate m = (MetricsTimeVaryingRate)registry.get(name); if (m == null) { m = new MetricsTimeVaryingRate(name, this.registry); this.needsUpdateMessage = true; } if (numOps > 0) { m.inc(numOps, amt); } }
protected void maintainStats() { int curOps = this.getPreviousIntervalNumOps(); if (curOps > 0) { long curTime = this.getPreviousIntervalAverageTime(); long totalTime = curTime * curOps; if (curTime == 0 || totalTime / curTime == curOps) { super.inc(curOps, totalTime); } else { LOG.info("Stats for " + this.getName() + " overflowed! resetting"); } } } }
/** * Flush data to persistent store. * Collect sync metrics. */ public void flush() throws IOException { numSync++; long start = FSNamesystem.now(); flushAndSync(); long end = FSNamesystem.now(); totalTimeSync += (end - start); if (sync != null) { sync.inc(end - start); } }
public Pair<Long, Long> call() throws Exception { // only one worker to response to the request queue, so that do not need synchronized. should // issue a batch timestamp request for the current queue if no cached timestamps available. // TODO(cuijianwei): could issue a batch timestamp by another thread before all cached timestamps consumed if (cachedTimestampCount == 0) { int batchRequestSize = requestQueue.size() + 1; currentTimestamp = getTimestamps(batchRequestSize); currentRequestId = currentTimestamp; cachedTimestampCount = batchRequestSize; ThemisStatistics.getStatistics().batchSizeOfTimestampRequest.inc(batchRequestSize); } --cachedTimestampCount; return new Pair<Long, Long>(currentRequestId, currentTimestamp++); }