public void stopWriteCacheFlushTimer ( int pagesFlushed ) { // lazy initialization to prevent memory consumption if ( writCacheCountersHolder == null ) writCacheCountersHolder = new WritCacheCountersHolder ( ) ; final long endTs = nanoTimer . getNano ( ) ; final long timeDiff = ( endTs - timeStamps . pop ( ) ) ; writCacheCountersHolder . flushOperationsCount ++ ; writCacheCountersHolder . amountOfPagesFlushed += pagesFlushed ; writCacheCountersHolder . flushOperationsTime += timeDiff ; makeSnapshotIfNeeded ( endTs ) ; }
Stops and records results of timer which counts how much time was spent on operation of flush pages in write cache .