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 "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2016/01/18 10:41:39 UTC
[jira] [Resolved] (OAK-3877) PerfLogger should use System.nanoTime
instead of System.currentTimeMillis
[ https://issues.apache.org/jira/browse/OAK-3877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chetan Mehrotra resolved OAK-3877.
----------------------------------
Resolution: Fixed
Fix Version/s: (was: 1.4)
1.3.14
Done with 1725206
> PerfLogger should use System.nanoTime instead of System.currentTimeMillis
> -------------------------------------------------------------------------
>
> Key: OAK-3877
> URL: https://issues.apache.org/jira/browse/OAK-3877
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core
> Reporter: Chetan Mehrotra
> Assignee: Chetan Mehrotra
> Priority: Minor
> Fix For: 1.3.14
>
>
> PerfLogger currently make use of System.currentTimeMillis for timing the performance. It would be better to make use of System.nanoTime.
> Per [~ianeboston] [comment|https://issues.apache.org/jira/browse/OAK-3654?focusedCommentId=15022031&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15022031] and [1]
> bq. You should always try to use nanoTime to do timing measurement or calculation
> This would provide following benefits
> * Simpler integration with Metric stats support which makes use of nanoTime
> * No possibility of drift i.e. currentTimeMillis going back in time
> [1] https://blogs.oracle.com/dholmes/entry/inside_the_hotspot_vm_clocks
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)