Skip to content

Commit a79d6ca

Browse files
Adding Hit counts and Miss counts for QueryCache exposed through REST api. (#60114)
1 parent d25c29f commit a79d6ca

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
@@ -175,8 +175,12 @@ protected Table getTableWithHeader(final RestRequest request) {
175175

176176
table.addCell("query_cache.memory_size", "alias:qcm,queryCacheMemory;default:false;text-align:right;desc:used query cache");
177177
table.addCell("query_cache.evictions", "alias:qce,queryCacheEvictions;default:false;text-align:right;desc:query cache evictions");
178+
table.addCell("query_cache.hit_count", "alias:qchc,queryCacheHitCount;default:false;text-align:right;desc:query cache hit counts");
179+
table.addCell("query_cache.miss_count",
180+
"alias:qcmc,queryCacheMissCount;default:false;text-align:right;desc:query cache miss counts");
178181

179-
table.addCell("request_cache.memory_size", "alias:rcm,requestCacheMemory;default:false;text-align:right;desc:used request cache");
182+
table.addCell("request_cache.memory_size",
183+
"alias:rcm,requestCacheMemory;default:false;text-align:right;desc:used request cache");
180184
table.addCell("request_cache.evictions",
181185
"alias:rce,requestCacheEvictions;default:false;text-align:right;desc:request cache evictions");
182186
table.addCell("request_cache.hit_count",
@@ -365,6 +369,8 @@ Table buildTable(boolean fullId, RestRequest req, ClusterStateResponse state, No
365369
QueryCacheStats fcStats = indicesStats == null ? null : indicesStats.getQueryCache();
366370
table.addCell(fcStats == null ? null : fcStats.getMemorySize());
367371
table.addCell(fcStats == null ? null : fcStats.getEvictions());
372+
table.addCell(fcStats == null ? null : fcStats.getHitCount());
373+
table.addCell(fcStats == null ? null : fcStats.getMissCount());
368374

369375
RequestCacheStats qcStats = indicesStats == null ? null : indicesStats.getRequestCache();
370376
table.addCell(qcStats == null ? null : qcStats.getMemorySize());

0 commit comments

Comments
 (0)