mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Valery Kharseko
yesterday 504a43fc479d884085df9895900608dc5b0aca6f
opendj-server-legacy/src/main/java/org/opends/server/extensions/EntryCacheCommon.java
@@ -13,6 +13,7 @@
 *
 * Copyright 2006-2008 Sun Microsystems, Inc.
 * Portions Copyright 2014-2016 ForgeRock AS.
 * Portions Copyright 2026 3A Systems, LLC.
 */
package org.opends.server.extensions;
@@ -362,11 +363,11 @@
      // Cache misses is required to get cache tries and hit ratio.
      if (cacheMisses != null)
      {
        Long cacheTries = cacheHits + cacheMisses;
        long cacheTries = cacheHits + cacheMisses;
        attrs.add("entryCacheTries", cacheTries);
        Double hitRatioRaw = cacheTries > 0 ? cacheHits.doubleValue()
            / cacheTries.doubleValue() : cacheHits.doubleValue() / 1;
        double hitRatioRaw = cacheTries > 0 ? cacheHits.doubleValue()
            / cacheTries : cacheHits.doubleValue();
        Double hitRatio = hitRatioRaw * 100D;
        attrs.add("entryCacheHitRatio", hitRatio);
      }