final PerformanceMonitor monitor = new PerformanceMonitor("sent");
ObjectStream<ChunkSample> measuredSampleStream = new ObjectStream<ChunkSample>() {
public ChunkSample read() throws IOException {
monitor.incrementCounter();
return sampleStream.read();
}
public void reset() throws IOException {
sampleStream.reset();