LCOV - code coverage report
Current view: top level - storage_broker/src - metrics.rs (source / functions) Coverage Total Hit
Test: 8ac049b474321fdc72ddcb56d7165153a1a900e8.info Lines: 100.0 % 18 18
Test Date: 2023-09-06 10:18:01 Functions: 100.0 % 6 6

            Line data    Source code
       1              : //! Broker metrics.
       2              : 
       3              : use metrics::{register_int_gauge, IntGauge};
       4              : use once_cell::sync::Lazy;
       5              : 
       6          372 : pub static NUM_PUBS: Lazy<IntGauge> = Lazy::new(|| {
       7          372 :     register_int_gauge!("storage_broker_active_publishers", "Number of publications")
       8          372 :         .expect("Failed to register metric")
       9          372 : });
      10              : 
      11          372 : pub static NUM_SUBS_TIMELINE: Lazy<IntGauge> = Lazy::new(|| {
      12          372 :     register_int_gauge!(
      13          372 :         "storage_broker_per_timeline_active_subscribers",
      14          372 :         "Number of subsciptions to particular tenant timeline id"
      15          372 :     )
      16          372 :     .expect("Failed to register metric")
      17          372 : });
      18              : 
      19          372 : pub static NUM_SUBS_ALL: Lazy<IntGauge> = Lazy::new(|| {
      20          372 :     register_int_gauge!(
      21          372 :         "storage_broker_all_keys_active_subscribers",
      22          372 :         "Number of subsciptions to all keys"
      23          372 :     )
      24          372 :     .expect("Failed to register metric")
      25          372 : });
        

Generated by: LCOV version 2.1-beta