import org.slf4j.Logger;

import java.util.concurrent.atomic.AtomicLong;

public class ScalableLogger implements ScalableLogging {
    private AtomicLong logCounter = new AtomicLong(0L);

    public ThrottlingStatusEnum trace(Logger logger, String format, Object... arguments) {
        if (hasThrottlingConditionPassed(logCounter)) {
            logger.trace(format, arguments);
            return ThrottlingStatusEnum.LOGGED;
        } else {
            return ThrottlingStatusEnum.THROTTLED;
        }
    }

    public boolean hasThrottlingConditionPassed(final AtomicLong logCounter) {
        if (logCounter.getAndIncrement() % 1000 == 0) {
            return true;
        } else {
            return false;
        }
    }
}
@@ -65,16 +65,62 @@
 micLong;
+%0Aimport java.util.concurrent.atomic.LongAdder;
 %0A%0Apublic
@@ -182,26 +182,25 @@
 private 
-AtomicLong
+LongAdder
  logCoun
@@ -213,21 +213,18 @@
 new 
-AtomicLong(0L
+LongAdder(
 );%0A%0A
@@ -415,16 +415,52 @@
 ments);%0A
+            logCounter.increment();%0A
         
@@ -638,26 +638,25 @@
 d(final 
-AtomicLong
+LongAdder
  logCoun
@@ -689,23 +689,17 @@
 ter.
-getAndIncrement
+longValue
 () %25

remove target 1.8