Skip to content

Commit 523cccf

Browse files
authoredOct 30, 2024··
chore(metrics): Comment code to make it easier to understand (#75)
1 parent 4779e82 commit 523cccf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎src/metrics_utils.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ use std::{
55

66
use metrics::{describe_counter, describe_gauge, describe_histogram, gauge, histogram};
77

8+
// counters
89
pub const OPENED_TOTAL: &str = "mobc_pool_connections_opened_total";
910
pub const CLOSED_TOTAL: &str = "mobc_pool_connections_closed_total";
10-
pub const OPEN_CONNECTIONS: &str = "mobc_pool_connections_open";
1111

12+
// gauges
13+
pub const OPEN_CONNECTIONS: &str = "mobc_pool_connections_open";
1214
pub const ACTIVE_CONNECTIONS: &str = "mobc_pool_connections_busy";
1315
pub const IDLE_CONNECTIONS: &str = "mobc_pool_connections_idle";
1416
pub const WAIT_COUNT: &str = "mobc_client_queries_wait";
17+
18+
// histogram
1519
pub const WAIT_DURATION: &str = "mobc_client_queries_wait_histogram_ms";
1620

1721
pub fn describe_metrics() {

0 commit comments

Comments
 (0)
Please sign in to comment.