@@ -51,12 +51,7 @@ class JournalMetrics {
5151 @ Metric ("Number of bytes served via RPC" )
5252 MutableCounterLong bytesServedViaRpc ;
5353
54- @ Metric
55- MutableStat rpcRequestCacheMissAmount = new MutableStat (
56- "RpcRequestCacheMissAmount" , "Number of RPC requests unable to be " +
57- "served due to lack of availability in cache, and how many " +
58- "transactions away the request was from being in the cache." ,
59- "Misses" , "Txns" );
54+ private MutableStat rpcRequestCacheMissAmount ;
6055
6156 @ Metric ("Number of RPC requests with zero edits returned" )
6257 MutableCounterLong rpcEmptyResponses ;
@@ -87,6 +82,11 @@ class JournalMetrics {
8782 "syncs" + interval + "s" ,
8883 "Journal sync time" , "ops" , "latencyMicros" , interval );
8984 }
85+ rpcRequestCacheMissAmount = registry
86+ .newStat ("RpcRequestCacheMissAmount" , "Number of RPC requests unable to be " +
87+ "served due to lack of availability in cache, and how many " +
88+ "transactions away the request was from being in the cache." ,
89+ "Misses" , "Txns" );
9090 }
9191
9292 public static JournalMetrics create (Journal j ) {
@@ -149,4 +149,8 @@ public MutableCounterLong getNumEditLogsSynced() {
149149 public void incrNumEditLogsSynced () {
150150 numEditLogsSynced .incr ();
151151 }
152+
153+ public void addRpcRequestCacheMissAmount (long cacheMissAmount ) {
154+ rpcRequestCacheMissAmount .add (cacheMissAmount );
155+ }
152156}
0 commit comments