public void reset() {num_blockings=0; avg_blockings.clear();}
public void clear() { super.clear(); if(values != null) values.clear(); min=Long.MAX_VALUE; max=0; }
public void reset() { lock.lock(); try { num_blockings=0; avg_block_time.clear(); } finally { lock.unlock(); } }
public void clear() { lock.lock(); try { num_blockings=0; avg_block_time.clear(); credits.clear(); credits_available.signalAll(); } finally { lock.unlock(); } }
public void resetStats() { super.resetStats(); avg.clear(); }
public <T extends Average> T add(long num) { if(num < 0) return (T)this; // If the product of the average and the number of samples would be greater than Long.MAX_VALUE, we have // to reset the count and average to prevent a long overflow. This will temporarily lose the sample history, and // the next sample will be the new average, but with more data points, the average should become more precise. // Note that overflow should be extremely seldom, as we usually use Average in cases where we don't have a huge // number of sample and the average is pretty small (e.g. an RPC invocation) if(Util.productGreaterThan(count, (long)Math.ceil(avg), Long.MAX_VALUE)) clear(); double total=count * avg; avg=(total + num) / ++count; return (T)this; }
public void reset() {num_blockings=0; avg_blockings.clear();}
public void clear() { super.clear(); if(values != null) values.clear(); min=Long.MAX_VALUE; max=0; }
public void reset() { lock.lock(); try { num_blockings=0; avg_block_time.clear(); } finally { lock.unlock(); } }
public void clear() { lock.lock(); try { num_blockings=0; avg_block_time.clear(); credits.clear(); credits_available.signalAll(); } finally { lock.unlock(); } }
public <T extends Average> T add(long num) { if(num < 0) return (T)this; // If the product of the average and the number of samples would be greater than Long.MAX_VALUE, we have // to reset the count and average to prevent a long overflow. This will temporarily lose the sample history, and // the next sample will be the new average, but with more data points, the average should become more precise. // Note that overflow should be extremely seldom, as we usually use Average in cases where we don't have a huge // number of sample and the average is pretty small (e.g. an RPC invocation) if(Util.productGreaterThan(count, (long)Math.ceil(avg), Long.MAX_VALUE)) clear(); double total=count * avg; avg=(total + num) / ++count; return (T)this; }
public void resetStats() { super.resetStats(); avg.clear(); }