[
https://issues.apache.org/jira/browse/METRON-2195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16896363#comment-16896363
]
Michael Miklavcic commented on METRON-2195:
-------------------------------------------
{quote}We have other on demand testing code for performance I think, this could
be like that code and not run as part of the build{quote}
[~otto] not an unreasonable suggestion, I'd be supportive of this approach as
well. I did this when developing the HLLP Stellar implementation, e.g. -
[https://github.com/apache/metron/blob/master/metron-analytics/metron-statistics/src/main/java/org/apache/metron/statistics/approximation/HLLPMeasurement.java|https://github.com/apache/metron/blob/master/metron-analytics/metron-statistics/src/main/java/org/apache/metron/statistics/approximation/HLLPMeasurement.java]
> Add defensive log level checks when constructing logs is expensive
> ------------------------------------------------------------------
>
> Key: METRON-2195
> URL: https://issues.apache.org/jira/browse/METRON-2195
> Project: Metron
> Issue Type: Improvement
> Reporter: Otto Fowler
> Assignee: Dale Richardson
> Priority: Critical
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> There are instances where we log, and output strings for json objects and
> other things that are quite expensive.
> These are done regardless of the log level being enabled and can increase
> performance significantly:
> https://gist.github.com/mmiklavc/7fd6af13bfa0ca05d9b3f4e7806c8d77
> https://github.com/apache/metron/blob/master/metron-platform/metron-writer/metron-writer-storm/src/main/java/org/apache/metron/writer/hdfs/HdfsWriter.java#L127
> We need to find places where this happens, and employ the best practice check
> for the log level being enabled ( best practice if your parameters or log
> message construction takes a lot of time ).
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)