question: public synchronized void addMeasurement ( long value ) { Validate . isTrue ( value >= 0 , Long . toString ( value ) ) ; if ( Long . MAX_VALUE - totalMs < value ) { reset ( ) ; } ++ hits ; totalMs += value ; if ( value > ceilingMs ) { effectiveCeilingMs = ceilingMs ; ceilingMs = value ; } else if ( value > effectiveCeilingMs ) { effectiveCeilingMs = value ; } if ( value < floorMs ) { floorMs = value ; } }
target:  Add measurement to the metrics. Thread safe.