You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2016/03/31 09:58:09 UTC
[25/50] logging-log4j2 git commit: SimplePerfTest: avoid
Thread.sleep() during perf tests since it skews the result
SimplePerfTest: avoid Thread.sleep() during perf tests since it skews the result
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/fea7320a
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/fea7320a
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/fea7320a
Branch: refs/heads/master
Commit: fea7320a12ae62b2623306f6079f3ef0bed913d8
Parents: 0cda9c4
Author: rpopma <rp...@apache.org>
Authored: Sun Mar 20 19:26:57 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sun Mar 20 19:26:57 2016 +0900
----------------------------------------------------------------------
.../apache/logging/log4j/core/async/perftest/SimplePerfTest.java | 2 --
1 file changed, 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fea7320a/log4j-core/src/test/java/org/apache/logging/log4j/core/async/perftest/SimplePerfTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/async/perftest/SimplePerfTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/async/perftest/SimplePerfTest.java
index d9d460b..6d959c2 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/async/perftest/SimplePerfTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/async/perftest/SimplePerfTest.java
@@ -52,7 +52,6 @@ public class SimplePerfTest {
System.out.printf("Warmup: Throughput: %,d ops/s%n", opsPerSec);
total += opsPerSec;
count++;
- Thread.sleep(1000);// drain buffer
} while (System.currentTimeMillis() < end);
System.out.printf("Average warmup throughput: %,d ops/s%n", total/count);
@@ -63,7 +62,6 @@ public class SimplePerfTest {
loop(logger, ITERATIONS);
long endNanos = System.nanoTime();
durationNanos[i] = endNanos - startNanos;
- Thread.sleep(1000);// drain buffer
}
total = 0;
for (int i = 0; i < COUNT; i++) {