You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Vikas Saurabh (JIRA)" <ji...@apache.org> on 2016/07/07 09:24:10 UTC

[jira] [Comment Edited] (OAK-4542) PerfLogger should also allow a threshold to log at INFO

    [ https://issues.apache.org/jira/browse/OAK-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15365854#comment-15365854 ] 

Vikas Saurabh edited comment on OAK-4542 at 7/7/16 9:23 AM:
------------------------------------------------------------

{{PerfLogger}} currently tries best to return early if log level isn't DEBUG or TRACE. So, if a client wants to utilize this improvement, they'd probably need to flag the intent at PerfLogger.start() too.

So, for DEBUG and TRACE, the behavior shall remain the same. BUT, we'd also return time for start(msg, true /\*logAtInfoToo\*/), we'd just return time but not log message (as it's for isInfoEnabled()... so, trace is implicitly off) -- so, the alternative start would simply be start(true /\*logAtInfoToo\*/). Updating end() is rather simple.

[~chetanm], does this seem like a fair way to move forward?


was (Author: catholicon):
{{PerfLogger}} currently tries best to return early if log level isn't DEBUG or TRACE. So, if a client wants to utilize this improvement, they'd probably need to flag the intent at PerfLogger.start() too ... but I think it'd be still be a bad idea to log message in start() for INFO intent.

So, for DEBUG and TRACE, the behavior shall remain the same. BUT, for start(msg, true /*logAtInfoToo*/), we'd just return time but not log message -- so, the alternative start would simply be start(true /*logAtInfoToo*/). Updating end() is rather simple.

[~chetanm], does this seem like a fair way to move forward?

> PerfLogger should also allow a threshold to log at INFO
> -------------------------------------------------------
>
>                 Key: OAK-4542
>                 URL: https://issues.apache.org/jira/browse/OAK-4542
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: Vikas Saurabh
>            Assignee: Vikas Saurabh
>            Priority: Minor
>              Labels: candidate_oak_1_0, candidate_oak_1_2, candidate_oak_1_4, monitoring, performance
>
> Currently, {{PerfLogger}} logs at DEBUG if time spent in operation is more that threshold ms.
> We should also be able to have a second level threshold of time, beyond which the log should happen at INFO. It helps to catch cases for which the timing gets too poor at the onset of some performance issue and by the time of investigation (opportunity to add DEBUG logger) is too late already.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)