Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-865 Expose repository management data and statistics
  3. OAK-863

Enable stats for various caches used in Oak by default

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.9
    • None

    Description

      To get a better picture around the usage of cache it would be helpful to enable the statistics for various caches used in Oak

      nodeCache = CacheBuilder.newBuilder()
                              .weigher(...)
                              .maximumWeight(...)
                              .recordStats()
                              .build();
      

      Once enabled it allows to get stats like below

      CacheStats{hitCount=763322, missCount=51333, loadSuccessCount=0, loadExceptionCount=0, totalLoadTime=0, evictionCount=3496}
      

      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

      Attachments

        1. OAK-863-2.patch
          34 kB
          Chetan Mehrotra
        2. cache-stats.png
          239 kB
          Chetan Mehrotra
        3. OAK-863-1.patch
          48 kB
          Chetan Mehrotra

        Activity

          People

            chetanm Chetan Mehrotra
            chetanm Chetan Mehrotra
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: