You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ck...@apache.org on 2018/10/16 23:43:25 UTC

[1/2] logging-log4j2 git commit: LOG4J2-2478 Return the computed variables on each benchmark to avoid DCE

Repository: logging-log4j2
Updated Branches:
  refs/heads/master 5815d1b7d -> de8b8fbf4


LOG4J2-2478 Return the computed variables on each benchmark to avoid DCE


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/2f224d3a
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/2f224d3a
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/2f224d3a

Branch: refs/heads/master
Commit: 2f224d3aa73324a8927fd4304a3cdeb73448b37c
Parents: 5815d1b
Author: DiegoEliasCosta <di...@gmail.com>
Authored: Mon Oct 15 13:21:30 2018 +0200
Committer: Carter Kozak <ck...@apache.org>
Committed: Tue Oct 16 19:42:00 2018 -0400

----------------------------------------------------------------------
 ...ractStringLayoutStringEncodingBenchmark.java | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/2f224d3a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/AbstractStringLayoutStringEncodingBenchmark.java
----------------------------------------------------------------------
diff --git a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/AbstractStringLayoutStringEncodingBenchmark.java b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/AbstractStringLayoutStringEncodingBenchmark.java
index 21b3e6a..959f6b2 100644
--- a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/AbstractStringLayoutStringEncodingBenchmark.java
+++ b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/AbstractStringLayoutStringEncodingBenchmark.java
@@ -123,15 +123,15 @@ public class AbstractStringLayoutStringEncodingBenchmark {
     @BenchmarkMode(Mode.Throughput)
     @OutputTimeUnit(TimeUnit.MILLISECONDS)
     @Benchmark
-    public void baseline() {
-        consume(bytes);
+    public long baseline() {
+        return consume(bytes);
     }
 
     @BenchmarkMode(Mode.Throughput)
     @OutputTimeUnit(TimeUnit.MILLISECONDS)
     @Benchmark
-    public void usAsciiGetBytes() {
-        consume(usAsciiGetBytesLayout.toByteArray(logEvent));
+    public long usAsciiGetBytes() {
+        return consume(usAsciiGetBytesLayout.toByteArray(logEvent));
     }
 
     @BenchmarkMode(Mode.Throughput)
@@ -145,8 +145,8 @@ public class AbstractStringLayoutStringEncodingBenchmark {
     @BenchmarkMode(Mode.Throughput)
     @OutputTimeUnit(TimeUnit.MILLISECONDS)
     @Benchmark
-    public void iso8859_1GetBytes() {
-        consume(iso8859_1GetBytesLayout.toByteArray(logEvent));
+    public long iso8859_1GetBytes() {
+        return consume(iso8859_1GetBytesLayout.toByteArray(logEvent));
     }
 
     @BenchmarkMode(Mode.Throughput)
@@ -160,8 +160,8 @@ public class AbstractStringLayoutStringEncodingBenchmark {
     @BenchmarkMode(Mode.Throughput)
     @OutputTimeUnit(TimeUnit.MILLISECONDS)
     @Benchmark
-    public void utf8GetBytes() {
-        consume(utf8GetBytesLayout.toByteArray(logEvent));
+    public long utf8GetBytes() {
+        return consume(utf8GetBytesLayout.toByteArray(logEvent));
     }
 
     @BenchmarkMode(Mode.Throughput)
@@ -175,8 +175,8 @@ public class AbstractStringLayoutStringEncodingBenchmark {
     @BenchmarkMode(Mode.Throughput)
     @OutputTimeUnit(TimeUnit.MILLISECONDS)
     @Benchmark
-    public void utf16GetBytes() {
-        consume(utf16GetBytesLayout.toByteArray(logEvent));
+    public long utf16GetBytes() {
+        return consume(utf16GetBytesLayout.toByteArray(logEvent));
     }
 
     @BenchmarkMode(Mode.Throughput)


[2/2] logging-log4j2 git commit: Changelog for LOG4J2-2478

Posted by ck...@apache.org.
Changelog for LOG4J2-2478


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/de8b8fbf
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/de8b8fbf
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/de8b8fbf

Branch: refs/heads/master
Commit: de8b8fbf4687d6fb7e6fba46d69825ced7b862e5
Parents: 2f224d3
Author: Carter Kozak <ck...@apache.org>
Authored: Tue Oct 16 19:43:06 2018 -0400
Committer: Carter Kozak <ck...@apache.org>
Committed: Tue Oct 16 19:43:06 2018 -0400

----------------------------------------------------------------------
 src/changes/changes.xml | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/de8b8fbf/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index c2a8f95..9d2d399 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -278,6 +278,9 @@
       <action issue="LOG4J2-2466" dev="ggregory" type="fix" due-to="Paolo Bonanomi, Gary Gregory">
         ColumnMapping literal not working.
       </action>
+      <action issue="LOG4J2-2478" dev="ckozak" type="fix" due-to="Diego Elias Costa">
+        AbstractStringLayoutStringEncodingBenchmark returns the computed variables on each benchmark to avoid DCE.
+      </action>
     </release>
     <release version="2.11.2" date="2018-MM-DD" description="GA Release 2.11.2">
       <action issue="LOG4J2-2391" dev="ckozak" type="update">
@@ -337,6 +340,9 @@
       <action issue="LOG4J2-2466" dev="ggregory" type="fix" due-to="Paolo Bonanomi, Gary Gregory">
         ColumnMapping literal not working.
       </action>
+      <action issue="LOG4J2-2478" dev="ckozak" type="fix" due-to="Diego Elias Costa">
+        AbstractStringLayoutStringEncodingBenchmark returns the computed variables on each benchmark to avoid DCE.
+      </action>
     </release>
     <release version="2.11.1" date="2018-07-22" description="GA Release 2.11.1">
       <action issue="LOG4J2-2389" dev="rgoers" type="fix" due-to="Liu Wen">