127128129130131132133134135136137
} catch (Exception e) { LOG.error(e); } } if (numOps > 0) { m.inc(numOps, amt); } } /** * Clear all metrics this exposes.
547548549550551552553554555556557
LOG.info("Error register " + call.getMethodName(), iae); m = (MetricsTimeVaryingRate) rpcDetailedMetrics.registry.get( call.getMethodName()); } } m.inc(processingTime); if (verbose) log("Return: "+value); return new ObjectWritable(method.getReturnType(), value);
639640641642643644645646647648649
rpcMetrics.rpcProcessingTime.inc(processingTime); MetricsTimeVaryingRate m = rpcMetrics.metricsList.get(call.getMethodName()); if (m != null) { m.inc(processingTime); } else { rpcMetrics.metricsList.put(call.getMethodName(), new MetricsTimeVaryingRate(call.getMethodName())); m = rpcMetrics.metricsList.get(call.getMethodName()); m.inc(processingTime);
644645646647648649650651652653654
m.inc(processingTime); } else { rpcMetrics.metricsList.put(call.getMethodName(), new MetricsTimeVaryingRate(call.getMethodName())); m = rpcMetrics.metricsList.get(call.getMethodName()); m.inc(processingTime); } if (verbose) log("Return: "+value); return new HbaseObjectWritable(method.getReturnType(), value);
480481482483484485486487488489490
485486487488489490491492493494495
m.inc(processingTime); } else { rpcMetrics.metricsList.put(call.getMethodName(), new MetricsTimeVaryingRate(call.getMethodName())); m = rpcMetrics.metricsList.get(call.getMethodName()); m.inc(processingTime); } if (verbose) log("Return: "+value); return new ObjectWritable(method.getReturnType(), value);
794795796797798799800801802803804
m = (MetricsTimeVaryingRate) rpcMetrics.registry.get( call.getMethodName()); } } // record call time in microseconds m.inc(processingMicroTime); if (verbose) log("Return: "+value); return new ObjectWritable(method.getReturnType(), value);
459460461462463464465466467468469
464465466467468469470471472473474
8485868788899091929394
public synchronized void inc(String name, int amt) { MetricsTimeVaryingRate m = get(name); if (m == null) { m = create(name); } m.inc(amt); } /** * Push the metrics to the monitoring subsystem on doUpdate() call. * @param context ctx