You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2021/04/04 20:25:31 UTC
[logging-log4j2] branch release-2.x updated: See if a delay helps
performance results in GitHub actions
This is an automated email from the ASF dual-hosted git repository.
rgoers pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/release-2.x by this push:
new 37ee247 See if a delay helps performance results in GitHub actions
37ee247 is described below
commit 37ee247fc8350d500dc4327a1e16a4bef92a4b14
Author: Ralph Goers <rg...@apache.org>
AuthorDate: Sun Apr 4 13:24:57 2021 -0700
See if a delay helps performance results in GitHub actions
---
.../java/org/apache/logging/log4j/core/SimplePerfTest.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/SimplePerfTest.java b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/SimplePerfTest.java
index 1b409b6..e1b639e 100644
--- a/log4j-core-its/src/test/java/org/apache/logging/log4j/core/SimplePerfTest.java
+++ b/log4j-core-its/src/test/java/org/apache/logging/log4j/core/SimplePerfTest.java
@@ -71,8 +71,9 @@ public class SimplePerfTest {
}
@Test
- public void debugDisabled() {
+ public void debugDisabled() throws Exception {
System.gc();
+ Thread.sleep(100);
final Timer timer = new Timer("DebugDisabled", LOOP_CNT);
timer.start();
for (int i=0; i < LOOP_CNT; ++i) {
@@ -84,9 +85,10 @@ public class SimplePerfTest {
}
@Test
- public void debugDisabledByLevel() {
+ public void debugDisabledByLevel() throws Exception {
System.gc();
- final Timer timer = new Timer("DebugDisabled", LOOP_CNT);
+ Thread.sleep(100);
+ final Timer timer = new Timer("IsEnabled", LOOP_CNT);
timer.start();
for (int i=0; i < LOOP_CNT; ++i) {
logger.isEnabled(Level.DEBUG);
@@ -97,8 +99,9 @@ public class SimplePerfTest {
}
@Test
- public void debugLogger() {
+ public void debugLogger() throws Exception {
System.gc();
+ Thread.sleep(100);
final Timer timer = new Timer("DebugLogger", LOOP_CNT);
final String msg = "This is a test";
timer.start();