@Override public void allocated( long bytes ) { allocatedBytes.add( bytes ); }
@Override public void addBytesWritten( long bytes ) { bytesWritten.add( bytes ); }
@Override public void evictions( long evictions ) { this.evictions.add( evictions ); }
@Override public void pins( long pins ) { this.pins.add( pins ); }
@Override public void faults( long faults ) { this.faults.add( faults ); }
@Override public void evictionExceptions( long evictionExceptions ) { this.evictionExceptions.add( evictionExceptions ); }
@Override public void flushes( long flushes ) { this.flushes.add( flushes ); }
@Override public void bytesRead( long bytesRead ) { this.bytesRead.add( bytesRead ); }
@Override public void deallocated( long bytes ) { allocatedBytes.add( -bytes ); } }
public void add( long amount ) { progress.add( amount ); } }
@Override public void unpins( long unpins ) { this.unpins.add( unpins ); }
@Override public void hits( long hits ) { this.hits.add( hits ); }
@Override public void bytesWritten( long bytesWritten ) { this.bytesWritten.add( bytesWritten ); }
/** * Records the time to execute remove operations. * * @param durationNanos the amount of time in nanoseconds */ public void recordRemoveTime(long durationNanos) { if (enabled && (durationNanos != 0)) { removeTimeNanos.add(durationNanos); } }
private void incrementQueue() { if ( queuedBatches.getAndIncrement() == 0 ) { // This is the first batch after we last drained the queue. long lastBatchEnd = lastBatchEndTime.get(); if ( lastBatchEnd != 0 ) { upstreamIdleTime.add( currentTimeMillis() - lastBatchEnd ); } } }
@SuppressWarnings( "unchecked" ) protected void sendDownstream( Object batch ) { long time = downstream.receive( doneBatches.getAndIncrement(), batch ); downstreamIdleTime.add( time ); }
/** * Records cache evictions. * * @param count the number of evictions to record */ public void recordEvictions(@NonNegative long count) { if (enabled) { evictions.add(count); } }
/** * Records cache hits. This should be called when a cache request returns a cached value. * * @param count the number of hits to record */ public void recordHits(@NonNegative long count) { if (enabled) { hits.add(count); } }
/** * Records cache misses. This should be called when a cache request returns a value that was not * found in the cache. * * @param count the number of misses to record */ public void recordMisses(@NonNegative long count) { if (enabled) { misses.add(count); } }
private void processEvent( ProblemReporter report ) { monitor.beforeProcessEvent(); out.println( report.message() ); queueSize.add( -1 ); }