You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/apollo_network_benchmark/src/bin/broadcast_network_stress_test_node/metrics.rs
+32-2Lines changed: 32 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,15 @@
1
+
use std::collections::HashMap;
1
2
use std::time::Duration;
2
3
3
4
use apollo_metrics::define_metrics;
4
5
use apollo_metrics::metrics::LossyIntoF64;
5
-
use apollo_network::metrics::NetworkMetrics;
6
+
use apollo_network::metrics::{
7
+
BroadcastNetworkMetrics,
8
+
NetworkMetrics,
9
+
NETWORK_BROADCAST_DROP_LABELS,
10
+
};
11
+
12
+
usecrate::protocol::TOPIC;
6
13
7
14
define_metrics!(
8
15
Infra => {
@@ -21,6 +28,9 @@ define_metrics!(
21
28
// network metrics from the network manager
22
29
MetricGauge{NETWORK_CONNECTED_PEERS,"network_connected_peers","Number of connected peers in the network"},
23
30
MetricGauge{NETWORK_BLACKLISTED_PEERS,"network_blacklisted_peers","Number of blacklisted peers in the network"},
31
+
MetricCounter{NETWORK_STRESS_TEST_SENT_MESSAGES,"network_stress_test_sent_messages","Number of stress test messages sent via broadcast", init = 0},
32
+
MetricCounter{NETWORK_STRESS_TEST_RECEIVED_MESSAGES,"network_stress_test_received_messages","Number of stress test messages received via broadcast", init = 0},
33
+
LabeledMetricCounter{NETWORK_DROPPED_BROADCAST_MESSAGES,"network_dropped_broadcast_messages","Number of dropped broadcast messages by reason", init = 0, labels = NETWORK_BROADCAST_DROP_LABELS},
24
34
25
35
// system metrics for the node
26
36
MetricGauge{SYSTEM_TOTAL_MEMORY_BYTES,"system_total_memory_bytes","Total system memory in bytes"},
0 commit comments