@@ -51,12 +51,7 @@ class JournalMetrics {
51
51
@ Metric ("Number of bytes served via RPC" )
52
52
MutableCounterLong bytesServedViaRpc ;
53
53
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 ;
60
55
61
56
@ Metric ("Number of RPC requests with zero edits returned" )
62
57
MutableCounterLong rpcEmptyResponses ;
@@ -87,6 +82,11 @@ class JournalMetrics {
87
82
"syncs" + interval + "s" ,
88
83
"Journal sync time" , "ops" , "latencyMicros" , interval );
89
84
}
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" );
90
90
}
91
91
92
92
public static JournalMetrics create (Journal j ) {
@@ -149,4 +149,8 @@ public MutableCounterLong getNumEditLogsSynced() {
149
149
public void incrNumEditLogsSynced () {
150
150
numEditLogsSynced .incr ();
151
151
}
152
+
153
+ public void addRpcRequestCacheMissAmount (long cacheMissAmount ) {
154
+ rpcRequestCacheMissAmount .add (cacheMissAmount );
155
+ }
152
156
}
0 commit comments