コード例 #1
0
 public void doUpdates(MetricsContext metricsContext) {
   synchronized (this) {
     for (MetricsBase m : registry.getMetricsList()) {
       m.pushMetric(metricsRecord);
     }
   }
   metricsRecord.update();
 }
コード例 #2
0
  /** Push the metrics to the monitoring subsystem on doUpdate() call. */
  public void doUpdates(MetricsContext context) {

    synchronized (this) {
      // ToFix - fix server to use the following two metrics directly so
      // the metrics do not have be copied here.
      numOpenConnections.set(myServer.getNumOpenConnections());
      callQueueLen.set(myServer.getCallQueueLen());
      for (MetricsBase m : registry.getMetricsList()) {
        m.pushMetric(metricsRecord);
      }
    }
    metricsRecord.update();
  }