pub fn new(metrics_registry: &MetricsRegistry) -> Self {
        Self {
            send_message_duration_ms: metrics_registry.histogram_vec(
                "send_message_duration_msec",
                "Time taken by event handler for send message call, in milliseconds",
                // 1ms, 2ms, 5ms - 100 sec, 200 sec, 500 sec
                decimal_buckets(0, 5),
                &["msg_type"],
            ),
            adverts_blocked: metrics_registry
                .int_counter("adverts_blocked", "Number of times advert delivery blocked"),
            chunks_blocked: metrics_registry
                .int_counter("chunks_blocked", "Number of times chunks delivery blocked"),
            requests_blocked: metrics_registry
                .int_counter("requests_blocked", "Number of requests delivery blocked"),
            retransmissions_blocked: metrics_registry.int_counter(
                "retransmissions_blocked",
                "Number of times retransmissions delivery blocked",
            ),
        }
    }
/// The constructor returns an `EventHandlerMetrics` instance.
The constructor returns an `EventHandlerMetrics` instance.
The constructor returns an ` EventHandlerMetrics ` instance .
pub fn new(metrics_registry: &MetricsRegistry) -> Self {
        Self {
            send_message_duration_ms: metrics_registry.histogram_vec(
                "send_message_duration_msec",
                "Time taken by event handler for send message call, in milliseconds",
                // 1ms, 2ms, 5ms - 100 sec, 200 sec, 500 sec
                decimal_buckets(0, 5),
                &["msg_type"],
            ),
            adverts_blocked: metrics_registry
                .int_counter("adverts_blocked", "Number of times advert delivery blocked"),
            chunks_blocked: metrics_registry
                .int_counter("chunks_blocked", "Number of times chunks delivery blocked"),
            requests_blocked: metrics_registry
                .int_counter("requests_blocked", "Number of requests delivery blocked"),
            retransmissions_blocked: metrics_registry.int_counter(
                "retransmissions_blocked",
                "Number of times retransmissions delivery blocked",
            ),
        }
    }
pub fn new ( metrics_registry : & MetricsRegistry ) -> Self { Self { send_message_duration_ms : metrics_registry . histogram_vec ( " " , " " , // 1ms, 2ms, 5ms - 100 sec, 200 sec, 500 sec decimal_buckets ( 0 , 5 ) , & [ " " ] , ) , adverts_blocked : metrics_registry . int_counter ( " " , " " ) , chunks_blocked : metrics_registry . int_counter ( " " , " " ) , requests_blocked : metrics_registry . int_counter ( " " , " " ) , retransmissions_blocked : metrics_registry . int_counter ( " " , " " , ) , } }
The constructor returns an `EventHandlerMetrics` instance.
The constructor returns an ` EventHandlerMetrics ` instance .
metrics_registry
&MetricsRegistry
metrics_registry
&MetricsRegistry