public void record ( long measurement ) { lastUsed = clock . now ( ) ; if ( isExpired ( ) ) { LOGGER . info ( "Attempting to get the value for an expired monitor: {}." + "Will start computing stats again." , getConfig ( ) . getName ( ) ) ; startComputingStats ( executor , statsConfig . getFrequencyMillis ( ) ) ; } synchronized ( updateLock ) { cur . record ( measurement ) ; } count . increment ( ) ; totalMeasurement . increment ( measurement ) ; }
Record the measurement we want to perform statistics on .