[
https://issues.apache.org/jira/browse/LOG4J2-1365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15241226#comment-15241226
]
Remko Popma edited comment on LOG4J2-1365 at 4/14/16 2:25 PM:
--------------------------------------------------------------
I made a GelfLayoutBenchmark, and it seems to give significant improvement with
CharSequenceFormattable.
Try GelfLayoutBenchmark in master and in this branch.
{noformat}
master:
Benchmark Mode Samples Score Error
Units
o.a.l.l.p.j.GelfLayoutBenchmark.baseline sample 44624 22.500 ± 1.292
ns/op
o.a.l.l.p.j.GelfLayoutBenchmark.log4j2Gelf sample 62117 1409.728 ± 5.251
ns/op
LOG4J2-1365:
Benchmark Mode Samples Score Error
Units
o.a.l.l.p.j.GelfLayoutBenchmark.baseline sample 44686 20.759 ± 0.111
ns/op
o.a.l.l.p.j.GelfLayoutBenchmark.log4j2Gelf sample 67550 1298.736 ± 5.006
ns/op
{noformat}
was (Author: mikaelstaldal):
I made a GelfLayoutBenchmark, and it seems to give significant improvement with
CharSequenceFormattable.
Try GelfLayoutBenchmark in master and in this branch.
master:
Benchmark Mode Samples Score Error
Units
o.a.l.l.p.j.GelfLayoutBenchmark.baseline sample 44624 22.500 ± 1.292
ns/op
o.a.l.l.p.j.GelfLayoutBenchmark.log4j2Gelf sample 62117 1409.728 ± 5.251
ns/op
LOG4J2-1365:
Benchmark Mode Samples Score Error
Units
o.a.l.l.p.j.GelfLayoutBenchmark.baseline sample 44686 20.759 ± 0.111
ns/op
o.a.l.l.p.j.GelfLayoutBenchmark.log4j2Gelf sample 67550 1298.736 ± 5.006
ns/op
> Add CharSequenceFormattable interface for Messages to improve performance of
> Layouts
> ------------------------------------------------------------------------------------
>
> Key: LOG4J2-1365
> URL: https://issues.apache.org/jira/browse/LOG4J2-1365
> Project: Log4j 2
> Issue Type: Improvement
> Components: Layouts
> Affects Versions: 2.5
> Reporter: Mikael Ståldal
> Assignee: Mikael Ståldal
> Priority: Minor
>
> {code}
> public interface CharSequenceFormattable {
> CharSequence getFormattedCharSequence();
> }
> {code}
> This can be implemented by Messages where it makes sense and used by Layouts
> where it makes sense.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]