@GenerateMicroBenchmark @Group("Adder") @GroupThreads(1) public void adWrites() { BlackHole.consumeCPU(consumedCPU); longAdder.add(1); BlackHole.consumeCPU(consumedCPU); }
/** * Mark the occurrence of a given number of events. * * @param n the number of events */ public void mark(long n) { count.add(n); m1Rate.update(n); m5Rate.update(n); m15Rate.update(n); }
/** * Increments total processing time. * * @param time processing time to add, in nanoseconds */ public void addProcessingTime(long time) { processingTime.add(time); }
/** * Change current size. * * @param delta Delta in bytes. */ private void changeSize(int delta) { if (delta != 0) curSize.add(delta); }