@@ -104,14 +104,6 @@ lazy_static::lazy_static! {
104104 & [ "subscriber_id" ]
105105 ) . unwrap( ) ;
106106
107- static ref GRPC_SUBCRIBER_RX_LOAD : IntGaugeVec = IntGaugeVec :: new(
108- Opts :: new(
109- "grpc_subscriber_recv_bandwidth_load" ,
110- "Current Receiver rate of subscriber channel (in bytes per second)"
111- ) ,
112- & [ "subscriber_id" ]
113- ) . unwrap( ) ;
114-
115107 static ref GRPC_CLIENT_DISCONNECTS : IntCounterVec = IntCounterVec :: new(
116108 Opts :: new(
117109 "grpc_client_disconnects_total" ,
@@ -146,56 +138,12 @@ lazy_static::lazy_static! {
146138 & [ "type" ]
147139 ) . unwrap( ) ;
148140
149- static ref PRE_ENCODED_CACHE_SKIP : IntCounterVec = IntCounterVec :: new(
150- Opts :: new( "yellowstone_grpc_pre_encoded_cache_skip" , "Pre-encoded cache skips due to unempty data slices" ) ,
151- & [ "type" ]
152- ) . unwrap( ) ;
153-
154- static ref PRE_ENCODE_POPULATED_ON_ARRIVAL : IntCounterVec = IntCounterVec :: new(
155- Opts :: new( "yellowstone_grpc_pre_encode_populated_on_arrival" , "OnceLock already populated when subscriber encodes" ) ,
156- & [ "type" ]
157- ) . unwrap( ) ;
158-
159- static ref PRE_ENCODE_EMPTY_ON_ARRIVAL : IntCounterVec = IntCounterVec :: new(
160- Opts :: new( "yellowstone_grpc_pre_encode_empty_on_arrival" , "OnceLock empty when subscriber encodes" ) ,
161- & [ "type" ]
162- ) . unwrap( ) ;
163-
164- static ref PARALLEL_ENCODER_LATENCY_US : Histogram = Histogram :: with_opts(
165- HistogramOpts :: new(
166- "yellowstone_grpc_parallel_encoder_latency_us" ,
167- "Time spent in parallel encoder encode() in microseconds"
168- )
169- . buckets( vec![ 10.0 , 50.0 , 100.0 , 250.0 , 500.0 , 1000.0 , 2500.0 , 5000.0 , 10000.0 ] )
170- ) . unwrap( ) ;
171-
172- static ref PARALLEL_ENCODER_QUEUE_DEPTH : IntGauge = IntGauge :: new(
173- "yellowstone_grpc_parallel_encoder_queue_depth" ,
174- "Number of batches waiting to be encoded"
175- ) . unwrap( ) ;
176-
177- static ref FAST_PATH_TIME_US : Histogram = Histogram :: with_opts(
178- HistogramOpts :: new(
179- "yellowstone_grpc_fast_path_time_us" ,
180- "Time spent in pre-encoded cache hit path in microseconds"
181- )
182- . buckets( vec![ 0.1 , 0.5 , 1.0 , 2.5 , 5.0 , 10.0 , 25.0 , 50.0 ] )
183- ) . unwrap( ) ;
184-
185- static ref FALLBACK_ENCODE_TIME_US : Histogram = Histogram :: with_opts(
186- HistogramOpts :: new(
187- "yellowstone_grpc_fallback_encode_time_us" ,
188- "Time spent in fallback encode path in microseconds"
189- )
190- . buckets( vec![ 1.0 , 5.0 , 10.0 , 25.0 , 50.0 , 100.0 , 250.0 , 500.0 ] )
191- ) . unwrap( ) ;
192-
193- static ref GRPC_CONCURRENT_SUBSCRIBE_PER_TCP_CONNECTION : IntGaugeVec = IntGaugeVec :: new(
194- Opts :: new(
195- "grpc_concurrent_subscribe_per_tcp_connection" ,
196- "Current concurrent subscriptions per remote TCP peer socket address"
197- ) ,
198- & [ "remote_peer_sk_addr" ]
141+ static ref GRPC_CONCURRENT_SUBSCRIBE_PER_TCP_CONNECTION : IntGaugeVec = IntGaugeVec :: new(
142+ Opts :: new(
143+ "grpc_concurrent_subscribe_per_tcp_connection" ,
144+ "Current concurrent subscriptions per remote TCP peer socket address"
145+ ) ,
146+ & [ "remote_peer_sk_addr" ]
199147 ) . unwrap( ) ;
200148
201149 static ref TOTAL_TRAFFIC_SENT : IntCounter = IntCounter :: new(
@@ -374,19 +322,11 @@ impl PrometheusService {
374322 register ! ( GRPC_BYTES_SENT ) ;
375323 register ! ( GEYSER_ACCOUNT_UPDATE_RECEIVED ) ;
376324 register ! ( GRPC_SUBSCRIBER_SEND_BANDWIDTH_LOAD ) ;
377- register ! ( GRPC_SUBCRIBER_RX_LOAD ) ;
378325 register ! ( GRPC_SUBSCRIBER_QUEUE_SIZE ) ;
379326 register ! ( GEYSER_BATCH_SIZE ) ;
380327 register ! ( GRPC_CLIENT_DISCONNECTS ) ;
381328 register ! ( PRE_ENCODED_CACHE_HIT ) ;
382329 register ! ( PRE_ENCODED_CACHE_MISS ) ;
383- register ! ( PRE_ENCODED_CACHE_SKIP ) ;
384- register ! ( PRE_ENCODE_POPULATED_ON_ARRIVAL ) ;
385- register ! ( PRE_ENCODE_EMPTY_ON_ARRIVAL ) ;
386- register ! ( PARALLEL_ENCODER_LATENCY_US ) ;
387- register ! ( PARALLEL_ENCODER_QUEUE_DEPTH ) ;
388- register ! ( FAST_PATH_TIME_US ) ;
389- register ! ( FALLBACK_ENCODE_TIME_US ) ;
390330 register ! ( GRPC_CONCURRENT_SUBSCRIBE_PER_TCP_CONNECTION ) ;
391331 register ! ( TOTAL_TRAFFIC_SENT ) ;
392332 register ! ( TRAFFIC_SENT_PER_REMOTE_IP ) ;
@@ -599,12 +539,6 @@ pub fn set_subscriber_send_bandwidth_load<S: AsRef<str>>(subscriber_id: S, load:
599539 . set ( load) ;
600540}
601541
602- pub fn set_subscriber_recv_bandwidth_load < S : AsRef < str > > ( subscriber_id : S , load : i64 ) {
603- GRPC_SUBCRIBER_RX_LOAD
604- . with_label_values ( & [ subscriber_id. as_ref ( ) ] )
605- . set ( load) ;
606- }
607-
608542pub fn set_subscriber_queue_size < S : AsRef < str > > ( subscriber_id : S , size : u64 ) {
609543 GRPC_SUBSCRIBER_QUEUE_SIZE
610544 . with_label_values ( & [ subscriber_id. as_ref ( ) ] )
@@ -625,42 +559,6 @@ pub fn pre_encoded_cache_miss(msg_type: &str) {
625559 PRE_ENCODED_CACHE_MISS . with_label_values ( & [ msg_type] ) . inc ( ) ;
626560}
627561
628- pub fn pre_encoded_cache_skip ( msg_type : & str ) {
629- PRE_ENCODED_CACHE_SKIP . with_label_values ( & [ msg_type] ) . inc ( ) ;
630- }
631-
632- pub fn pre_encode_populated_on_arrival ( msg_type : & str ) {
633- PRE_ENCODE_POPULATED_ON_ARRIVAL
634- . with_label_values ( & [ msg_type] )
635- . inc ( ) ;
636- }
637-
638- pub fn pre_encode_empty_on_arrival ( msg_type : & str ) {
639- PRE_ENCODE_EMPTY_ON_ARRIVAL
640- . with_label_values ( & [ msg_type] )
641- . inc ( ) ;
642- }
643-
644- pub fn observe_parallel_encoder_latency_us ( latency : f64 ) {
645- PARALLEL_ENCODER_LATENCY_US . observe ( latency) ;
646- }
647-
648- pub fn encoder_queue_depth_inc ( ) {
649- PARALLEL_ENCODER_QUEUE_DEPTH . inc ( ) ;
650- }
651-
652- pub fn encoder_queue_depth_dec ( ) {
653- PARALLEL_ENCODER_QUEUE_DEPTH . dec ( ) ;
654- }
655-
656- pub fn observe_fast_path_time_us ( latency : f64 ) {
657- FAST_PATH_TIME_US . observe ( latency) ;
658- }
659-
660- pub fn observe_fallback_encode_time_us ( latency : f64 ) {
661- FALLBACK_ENCODE_TIME_US . observe ( latency) ;
662- }
663-
664562pub fn incr_grpc_method_call_count < S : AsRef < str > > ( method : S ) {
665563 GRPC_METHOD_CALL_COUNT
666564 . with_label_values ( & [ method. as_ref ( ) ] )
@@ -726,7 +624,6 @@ pub fn reset_metrics() {
726624 INVALID_FULL_BLOCKS . reset ( ) ;
727625 GRPC_SUBSCRIBER_SEND_BANDWIDTH_LOAD . reset ( ) ;
728626 GRPC_SUBSCRIBER_QUEUE_SIZE . reset ( ) ;
729- GRPC_SUBCRIBER_RX_LOAD . reset ( ) ;
730627
731628 // Reset counter vectors (clears all label combinations)
732629 MISSED_STATUS_MESSAGE . reset ( ) ;
@@ -740,6 +637,10 @@ pub fn reset_metrics() {
740637 GRPC_SUBSCRIPTION_LIMIT_EXCEEDED . reset ( ) ;
741638 GRPC_METHOD_CALL_COUNT . reset ( ) ;
742639
640+ // Pre-encoding
641+ PRE_ENCODED_CACHE_HIT . reset ( ) ;
642+ PRE_ENCODED_CACHE_MISS . reset ( ) ;
643+
743644 // Note: VERSION and GEYSER_ACCOUNT_UPDATE_RECEIVED are intentionally not reset
744645 // - VERSION contains build info set once on startup
745646 // - GEYSER_ACCOUNT_UPDATE_RECEIVED is a Histogram which doesn't support reset()
0 commit comments