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 2013/06/27 12:07:20 UTC

[jira] [Resolved] (OAK-863) Enable stats for various caches used in Oak by default

     [ https://issues.apache.org/jira/browse/OAK-863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chetan Mehrotra resolved OAK-863.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 0.9

Committed the changes with revision 1497267. 
                
> Enable stats for various caches used in Oak by default
> ------------------------------------------------------
>
>                 Key: OAK-863
>                 URL: https://issues.apache.org/jira/browse/OAK-863
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>            Priority: Minor
>             Fix For: 0.9
>
>         Attachments: cache-stats.png, OAK-863-1.patch, OAK-863-2.patch
>
>
> To get a better picture around the usage of cache it would be helpful to enable the [statistics|http://code.google.com/p/guava-libraries/wiki/CachesExplained#Statistics] for various caches used in Oak
> {code:java}
> nodeCache = CacheBuilder.newBuilder()
>                         .weigher(...)
>                         .maximumWeight(...)
>                         .recordStats()
>                         .build();
> {code}
> Once enabled it allows to get stats like below
> {noformat}
> CacheStats{hitCount=763322, missCount=51333, loadSuccessCount=0, loadExceptionCount=0, totalLoadTime=0, evictionCount=3496}
> {noformat}
> As stats collection adds a very minor overhead we can look into making this setting configurable. 
> Untill we expose the stats via JMX one can extract the value in Sling env via approach mentioned in [this gist|https://gist.github.com/chetanmeh/5748650]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira