@@ -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 ;
@@ -84,6 +79,11 @@ class JournalMetrics {
8479          "syncs"  + interval  + "s" ,
8580          "Journal sync time" , "ops" , "latencyMicros" , interval );
8681    }
82+     rpcRequestCacheMissAmount  = registry 
83+         .newStat ("RpcRequestCacheMissAmount" , "Number of RPC requests unable to be "  +
84+                 "served due to lack of availability in cache, and how many "  +
85+                 "transactions away the request was from being in the cache." ,
86+             "Misses" , "Txns" );
8787  }
8888
8989  public  static  JournalMetrics  create (Journal  j ) {
@@ -138,4 +138,8 @@ void addSync(long us) {
138138      q .add (us );
139139    }
140140  }
141+ 
142+   public  void  addRpcRequestCacheMissAmount (long  cacheMissAmount ) {
143+     rpcRequestCacheMissAmount .add (cacheMissAmount );
144+   }
141145}
0 commit comments