int bytesConsumed = 0;
for(int i = 0; i < 10; i++) {
int bytes = (int)(Math.random() * 1000);
bytesConsumed += bytes;
throttler.incrementAndThrottle(bytes);
}
long endTime = System.currentTimeMillis();
double secs = (endTime - startTime) / (double)1000;
double avgBytesPerSec = bytesConsumed / secs;