From b151da09716edff4c98cc33a398fd0bc573942d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Wed, 17 Aug 2016 06:59:24 +0000 Subject: [PATCH] Further metrics for Query Cache #140 * Query_Cache_Entries : number of entries currently in the cache (including inactive) * Query_Cache_Purged : number of entries removed from the cache --- lib/Query_Cache.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/Query_Cache.cpp b/lib/Query_Cache.cpp index 0e7be0a9e..06eacd5d9 100644 --- a/lib/Query_Cache.cpp +++ b/lib/Query_Cache.cpp @@ -418,6 +418,18 @@ SQLite3_result * Query_Cache::SQL3_getStats() { pta[1]=buf; result->add_row(pta); } + { // Glo_cntPurge + pta[0]=(char *)"Query_Cache_Purged"; + sprintf(buf,"%lu", Glo_cntPurge); + pta[1]=buf; + result->add_row(pta); + } + { // Glo_num_entries + pta[0]=(char *)"Query_Cache_Entries"; + sprintf(buf,"%lu", Glo_num_entries); + pta[1]=buf; + result->add_row(pta); + } free(pta); return result; }