Skip to content

Commit fe71165

Browse files
Raj-Datta-Manohardanhermann
authored andcommitted
Adding Hit counts and Miss counts for QueryCache exposed through REST api. (elastic#60114)
1 parent 664ba0a commit fe71165

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

server/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,12 @@ protected Table getTableWithHeader(final RestRequest request) {
181181

182182
table.addCell("query_cache.memory_size", "alias:qcm,queryCacheMemory;default:false;text-align:right;desc:used query cache");
183183
table.addCell("query_cache.evictions", "alias:qce,queryCacheEvictions;default:false;text-align:right;desc:query cache evictions");
184+
table.addCell("query_cache.hit_count", "alias:qchc,queryCacheHitCount;default:false;text-align:right;desc:query cache hit counts");
185+
table.addCell("query_cache.miss_count",
186+
"alias:qcmc,queryCacheMissCount;default:false;text-align:right;desc:query cache miss counts");
184187

185-
table.addCell("request_cache.memory_size", "alias:rcm,requestCacheMemory;default:false;text-align:right;desc:used request cache");
188+
table.addCell("request_cache.memory_size",
189+
"alias:rcm,requestCacheMemory;default:false;text-align:right;desc:used request cache");
186190
table.addCell("request_cache.evictions",
187191
"alias:rce,requestCacheEvictions;default:false;text-align:right;desc:request cache evictions");
188192
table.addCell("request_cache.hit_count",
@@ -362,6 +366,8 @@ Table buildTable(boolean fullId, RestRequest req, ClusterStateResponse state, No
362366
QueryCacheStats fcStats = indicesStats == null ? null : indicesStats.getQueryCache();
363367
table.addCell(fcStats == null ? null : fcStats.getMemorySize());
364368
table.addCell(fcStats == null ? null : fcStats.getEvictions());
369+
table.addCell(fcStats == null ? null : fcStats.getHitCount());
370+
table.addCell(fcStats == null ? null : fcStats.getMissCount());
365371

366372
RequestCacheStats qcStats = indicesStats == null ? null : indicesStats.getRequestCache();
367373
table.addCell(qcStats == null ? null : qcStats.getMemorySize());

0 commit comments

Comments
 (0)