void function ( ) { final long loc0 = uncounted . getAndSet ( 0 ) ; final double loc1 = loc0 / interval ; if ( initialized ) { rate += ( alpha * ( loc1 - rate ) ) ; } else { rate = loc1 ; initialized = true ; } }
mark the passage of time and decay the current rate accordingly . concode_field_sep int ONE_MINUTE concode_elem_sep double M1_ALPHA concode_elem_sep double M5_ALPHA concode_elem_sep AtomicLong uncounted concode_elem_sep double SECONDS_PER_MINUTE concode_elem_sep double rate concode_elem_sep double alpha concode_elem_sep int FIVE_MINUTES concode_elem_sep double M15_ALPHA concode_elem_sep int FIFTEEN_MINUTES concode_elem_sep double interval concode_elem_sep int INTERVAL concode_elem_sep boolean initialized concode_field_sep EWMA fiveMinuteEWMA concode_elem_sep double getRate concode_elem_sep EWMA oneMinuteEWMA concode_elem_sep EWMA fifteenMinuteEWMA concode_elem_sep void update