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