Permalink
Browse files

Use long counters, avoid overflow in long iterations. Remove clean.

  • Loading branch information...
nitsanw committed Jan 9, 2018
1 parent a2191c1 commit f521002f5c4efe97c48ab80769379a065e94853c
@@ -214,22 +214,12 @@ public void alignedPrimitiveArgs(int i,
public static class ProcessorCounters {
public long processed;
public long processFailed;
@Setup(Level.Iteration)
public void clean() {
this.processed = this.processFailed = 0;
}
}
@AuxCounters
@State(Scope.Thread)
public static class CallerCounters {
public long callsFailed;
@Setup(Level.Iteration)
public void clean() {
this.callsFailed = 0;
}
}
public static final class StoppedException extends RuntimeException {
@@ -62,25 +62,15 @@ public void createQandPrimeCompilation() {
@AuxCounters
@State(Scope.Thread)
public static class PollCounters {
public int pollsFailed;
public int pollsMade;
@Setup(Level.Iteration)
public void clean() {
pollsFailed = pollsMade = 0;
}
public long pollsFailed;
public long pollsMade;
}
@AuxCounters
@State(Scope.Thread)
public static class OfferCounters {
public int offersFailed;
public int offersMade;
@Setup(Level.Iteration)
public void clean() {
offersFailed = offersMade = 0;
}
public long offersFailed;
public long offersMade;
}
private static ThreadLocal<Object> marker = new ThreadLocal<Object>();
@@ -210,22 +210,12 @@ public void alignedPrimitiveArgs(int i,
public static class ProcessorCounters {
public long processed;
public long processFailed;
@Setup(Level.Iteration)
public void clean() {
this.processed = this.processFailed = 0;
}
}
@AuxCounters
@State(Scope.Thread)
public static class CallerCounters {
public long callsFailed;
@Setup(Level.Iteration)
public void clean() {
this.callsFailed = 0;
}
}
public static final class StoppedException extends RuntimeException {
@@ -52,25 +52,15 @@ public void createQandPrimeCompilation() {
@AuxCounters
@State(Scope.Thread)
public static class PollCounters {
public int pollsFailed;
public int pollsMade;
@Setup(Level.Iteration)
public void clean() {
pollsFailed = pollsMade = 0;
}
public long pollsFailed;
public long pollsMade;
}
@AuxCounters
@State(Scope.Thread)
public static class OfferCounters {
public int offersFailed;
public int offersMade;
@Setup(Level.Iteration)
public void clean() {
offersFailed = offersMade = 0;
}
public long offersFailed;
public long offersMade;
}
@Benchmark
@@ -58,25 +58,15 @@ public void createQandPrimeCompilation() {
@AuxCounters
@State(Scope.Thread)
public static class PollCounters {
public int pollsFailed;
public int pollsMade;
@Setup(Level.Iteration)
public void clean() {
pollsFailed = pollsMade = 0;
}
public long pollsFailed;
public long pollsMade;
}
@AuxCounters
@State(Scope.Thread)
public static class OfferCounters {
public int offersFailed;
public int offersMade;
@Setup(Level.Iteration)
public void clean() {
offersFailed = offersMade = 0;
}
public long offersFailed;
public long offersMade;
}
@Benchmark
@@ -83,25 +83,15 @@ public void createQandPrimeCompilation() {
@AuxCounters
@State(Scope.Thread)
public static class PollCounters {
public int pollsFailed;
public int pollsMade;
@Setup(Level.Iteration)
public void clean() {
pollsFailed = pollsMade = 0;
}
public long pollsFailed;
public long pollsMade;
}
@AuxCounters
@State(Scope.Thread)
public static class OfferCounters {
public int offersFailed;
public int offersMade;
@Setup(Level.Iteration)
public void clean() {
offersFailed = offersMade = 0;
}
public long offersFailed;
public long offersMade;
}
@Benchmark
@@ -65,25 +65,15 @@ public void createQandPrimeCompilation() {
@AuxCounters
@State(Scope.Thread)
public static class PollCounters {
public int pollsFailed;
public int pollsMade;
@Setup(Level.Iteration)
public void clean() {
pollsFailed = pollsMade = 0;
}
public long pollsFailed;
public long pollsMade;
}
@AuxCounters
@State(Scope.Thread)
public static class OfferCounters {
public int offersFailed;
public int offersMade;
@Setup(Level.Iteration)
public void clean() {
offersFailed = offersMade = 0;
}
public long offersFailed;
public long offersMade;
}
@Benchmark
@@ -102,25 +102,15 @@ public void accept(Ping element) {
@AuxCounters
@State(Scope.Thread)
public static class PollCounters {
public int pollsFailed;
public int pollsMade;
// @Setup(Level.Iteration)
// public void clean() {
// pollsFailed = pollsMade = 0;
// }
public long pollsFailed;
public long pollsMade;
}
@AuxCounters
@State(Scope.Thread)
public static class OfferCounters {
public int offersFailed;
public int offersMade;
// @Setup(Level.Iteration)
// public void clean() {
// offersFailed = offersMade = 0;
// }
public long offersFailed;
public long offersMade;
}
private static ThreadLocal<Object> marker = new ThreadLocal<Object>();

0 comments on commit f521002

Please sign in to comment.