[jboss-jira] [JBoss JIRA] (DROOLS-4252) Kie Drools benchmark tune logging config
Matteo Mortari (Jira)
issues at jboss.org
Tue Jun 25 08:11:00 EDT 2019
Matteo Mortari created DROOLS-4252:
--------------------------------------
Summary: Kie Drools benchmark tune logging config
Key: DROOLS-4252
URL: https://issues.jboss.org/browse/DROOLS-4252
Project: Drools
Issue Type: Enhancement
Components: core engine
Reporter: Matteo Mortari
Assignee: Matteo Mortari
Attachments: image-2019-06-25-14-04-36-854.png
I observe that logback config inside Kie Drools benchmark is set with both {{%method}} and {{%line}} which from the logback manual:
{quote}L / line
Outputs the line number from where the logging request was issued.
Generating the line number information is not particularly fast. Thus, its use should be avoided unless execution speed is not an issue.
...
M / method
Outputs the method name where the logging request was issued.
Generating the method name is not particularly fast. Thus, its use should be avoided unless execution speed is not an issue.{quote}
In fact case in point for an introduced benchmark the symptom was normal logger/error message caused log of synthetic stacktrace being generated:
!image-2019-06-25-14-04-36-854.png|thumbnail!
The generation of the synthetic stacktrace by the logback logging framework should not influence the benchmark result, although I wanted to maintain the business logic that error, infos etc still get reported via SLF4j logging.
Changing the Kie Drools benchmark configuration on the specific benchmark I was chasing after, given an ~9x improvement:
{code:java}
BASELINE
Benchmark (numberOfElements) (sparseness) Mode Cnt Score Error Units
DMNEvaluateDecisionTablesSparseBenchmark.evaluateDecision 100 10 ss 250 18.447 ± 0.633 ms/op
AFTER
Benchmark (numberOfElements) (sparseness) Mode Cnt Score Error Units
DMNEvaluateDecisionTablesSparseBenchmark.evaluateDecision 100 10 ss 250 2.744 ± 0.180 ms/op
{code}
I believe the logback config should be changed in order to avoid introducing the degradation of execution time caused just by the logging framework, at least for those use-case when by standard we report Info, Error, etc.
/cc [~tirelli] [~mfusco]
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list