/** * Push the delta metrics to the mr. * The delta is since the last push/interval. * * Note this does NOT push to JMX * (JMX gets the info via {@link #getPreviousIntervalAverageTime()} and * {@link #getPreviousIntervalNumOps()} * * @param mr */ public synchronized void pushMetric(final MetricsRecord mr) { intervalHeartBeat(); try { mr.incrMetric(name + "_num_ops", getPreviousIntervalNumOps()); mr.setMetric(name + "_avg_time", getPreviousIntervalAverageTime()); } catch (Exception e) { LOG.info("pushMetric failed for " + name + "\n" + StringUtils.stringifyException(e)); } }
/** * Push the delta metrics to the mr. * The delta is since the last push/interval. * * Note this does NOT push to JMX * (JMX gets the info via {@link #getPreviousIntervalAverageTime()} and * {@link #getPreviousIntervalNumOps()} * * @param mr */ public synchronized void pushMetric(final MetricsRecord mr) { intervalHeartBeat(); try { mr.incrMetric(getName() + "_num_ops", getPreviousIntervalNumOps()); mr.setMetric(getName() + "_avg_time", getPreviousIntervalAverageTime()); } catch (Exception e) { LOG.info("pushMetric failed for " + getName() + "\n" , e); } }
/** * Push the delta metrics to the mr. * The delta is since the last push/interval. * * Note this does NOT push to JMX * (JMX gets the info via {@link #getPreviousIntervalAverageTime()} and * {@link #getPreviousIntervalNumOps()} * * @param mr */ public synchronized void pushMetric(final MetricsRecord mr) { intervalHeartBeat(); try { mr.incrMetric(getName() + "_num_ops", getPreviousIntervalNumOps()); mr.setMetric(getName() + "_avg_time", getPreviousIntervalAverageTime()); } catch (Exception e) { LOG.info("pushMetric failed for " + getName() + "\n" , e); } }
/** * Push the delta metrics to the mr. * The delta is since the last push/interval. * * Note this does NOT push to JMX * (JMX gets the info via {@link #getPreviousIntervalAverageTime()} and * {@link #getPreviousIntervalNumOps()} * * @param mr */ public synchronized void pushMetric(final MetricsRecord mr) { intervalHeartBeat(); try { mr.incrMetric(getName() + "_num_ops", getPreviousIntervalNumOps()); mr.setMetric(getName() + "_avg_time", getPreviousIntervalAverageTime()); } catch (Exception e) { LOG.info("pushMetric failed for " + getName() + "\n" , e); } }
lock.lock(); try { intervalHeartBeat(); try { if (mr != null) {
/** * Push the delta metrics to the mr. * The delta is since the last push/interval. * * Note this does NOT push to JMX * (JMX gets the info via {@link #getPreviousIntervalAverageTime()} and * {@link #getPreviousIntervalNumOps()} * * @param mr */ public synchronized void pushMetric(final MetricsRecord mr) { intervalHeartBeat(); try { mr.incrMetric(getName() + "_num_ops", getPreviousIntervalNumOps()); mr.setMetric(getName() + "_avg_time", getPreviousIntervalAverageTime()); } catch (Exception e) { LOG.info("pushMetric failed for " + getName() + "\n" , e); } }