private void reportMetered(final String name, final Metered meter) {
      EnumSet<MetricField> fields = reportedMetrics.get(name);
      if(fields == null) {
         return;
      }

      String nrName = buildRate(name);

      if(fields.contains(MetricField.ONE_MINUTE_RATE)) {
         NewRelic.recordMetric(nrName, (float)meter.getOneMinuteRate());
      }

      if(fields.contains(MetricField.FIVE_MINUTE_RATE)) {
         NewRelic.recordMetric(nrName, (float)meter.getFiveMinuteRate());
      }

      if(fields.contains(MetricField.FIFTEEN_MINUTE_RATE)) {
         NewRelic.recordMetric(nrName, (float)meter.getOneMinuteRate());
      }

      if(fields.contains(MetricField.MEAN_RATE)) {
         NewRelic.recordMetric(nrName, (float)meter.getMeanRate());
      }

      if(fields.contains(MetricField.COUNT)) {
         NewRelic.recordMetric(nrName, (float)meter.getCount());
      }
   }
private void reportMetered ( final String name , final Metered meter ) { EnumSet < MetricField > fields = reportedMetrics . get ( name ) ; if ( fields == null ) { return ; } String nrName = buildRate ( name ) ; if ( fields . contains ( MetricField . ONE_MINUTE_RATE ) ) { NewRelic . recordMetric ( nrName , ( float ) meter . getOneMinuteRate ( ) ) ; } if ( fields . contains ( MetricField . FIVE_MINUTE_RATE ) ) { NewRelic . recordMetric ( nrName , ( float ) meter . getFiveMinuteRate ( ) ) ; } if ( fields . contains ( MetricField . FIFTEEN_MINUTE_RATE ) ) { NewRelic . recordMetric ( nrName , ( float ) meter . getOneMinuteRate ( ) ) ; } if ( fields . contains ( MetricField . MEAN_RATE ) ) { NewRelic . recordMetric ( nrName , ( float ) meter . getMeanRate ( ) ) ; } if ( fields . contains ( MetricField . COUNT ) ) { NewRelic . recordMetric ( nrName , ( float ) meter . getCount ( ) ) ; } }
Reports a meter/timer.
@param name The name.
@param meter The meter.