/** * Return the total number of times that a {@link Query} has been looked up * in this {@link QueryCache}. Note that this number is incremented once per * segment so running a cached query only once will increment this counter * by the number of segments that are wrapped by the searcher. * Note that by definition, {@link #getTotalCount()} is the sum of * {@link #getHitCount()} and {@link #getMissCount()}. * @see #getHitCount() * @see #getMissCount() */ public final long getTotalCount() { return getHitCount() + getMissCount(); }
@Override public long getHitCount() { LRUQueryCache defaultQueryCache = indexSearcherProvider.getDefaultQueryCache(); return defaultQueryCache.getHitCount(); }
/** * Return the total number of times that a {@link Query} has been looked up * in this {@link QueryCache}. Note that this number is incremented once per * segment so running a cached query only once will increment this counter * by the number of segments that are wrapped by the searcher. * Note that by definition, {@link #getTotalCount()} is the sum of * {@link #getHitCount()} and {@link #getMissCount()}. * @see #getHitCount() * @see #getMissCount() */ public final long getTotalCount() { return getHitCount() + getMissCount(); }
/** * Return the total number of times that a {@link Query} has been looked up * in this {@link QueryCache}. Note that this number is incremented once per * segment so running a cached query only once will increment this counter * by the number of segments that are wrapped by the searcher. * Note that by definition, {@link #getTotalCount()} is the sum of * {@link #getHitCount()} and {@link #getMissCount()}. * @see #getHitCount() * @see #getMissCount() */ public final long getTotalCount() { return getHitCount() + getMissCount(); }
/** * Return the total number of times that a {@link Query} has been looked up * in this {@link QueryCache}. Note that this number is incremented once per * segment so running a cached query only once will increment this counter * by the number of segments that are wrapped by the searcher. * Note that by definition, {@link #getTotalCount()} is the sum of * {@link #getHitCount()} and {@link #getMissCount()}. * @see #getHitCount() * @see #getMissCount() */ public final long getTotalCount() { return getHitCount() + getMissCount(); }
private QueryCacheStats(final LRUQueryCache queryCache) { this(queryCache.getCacheCount(), queryCache.getCacheSize(), queryCache.getEvictionCount(), queryCache.getHitCount(), queryCache.getMissCount(), queryCache.getTotalCount(), (float) (queryCache.getHitCount() * 100) / queryCache.getTotalCount(), (float) (queryCache.getMissCount() * 100) / queryCache.getTotalCount()); }