public double getStatValueAsDouble ( T metric , String interval ) { StatValue statValue = getMonitoredStatValue ( metric ) ; if ( metric . isRateMetric ( ) ) { //check for DEFAULT can be removed when same check removed from statValueImpl if ( "default" . equals ( interval ) ) { interval = DefaultIntervals . ONE_MINUTE . getName ( ) ; } double result = statValue . getValueAsLong ( interval ) ; long duration = IntervalRegistry . getInstance ( ) . getInterval ( interval ) . getLength ( ) ; if ( duration > 0 ) result /= duration ; return result ; } return statValue . getValueAsDouble ( interval ) ; }
Get value of provided metric for the given interval as double value .