|
1 | 1 | #include "fd_gui.h" |
2 | 2 | #include "fd_gui_peers.h" |
3 | 3 | #include "fd_gui_printf.h" |
| 4 | +#include "fd_gui_metrics.h" |
4 | 5 |
|
5 | 6 | #include "../metrics/fd_metrics.h" |
6 | 7 | #include "../plugin/fd_plugin.h" |
@@ -397,6 +398,28 @@ fd_gui_estimated_tps_snap( fd_gui_t * gui ) { |
397 | 398 | gui->summary.estimated_tps_history_idx = (gui->summary.estimated_tps_history_idx+1UL) % FD_GUI_TPS_HISTORY_SAMPLE_CNT; |
398 | 399 | } |
399 | 400 |
|
| 401 | +static void |
| 402 | +fd_gui_network_stats_snap( fd_gui_t * gui, |
| 403 | + fd_gui_network_stats_t * cur ) { |
| 404 | + fd_topo_t * topo = gui->topo; |
| 405 | + ulong gossvf_tile_cnt = fd_topo_tile_name_cnt( topo, "gossvf" ); |
| 406 | + ulong gossip_tile_cnt = fd_topo_tile_name_cnt( topo, "gossip" ); |
| 407 | + ulong shred_tile_cnt = fd_topo_tile_name_cnt( topo, "shred" ); |
| 408 | + ulong net_tile_cnt = fd_topo_tile_name_cnt( topo, "net" ); |
| 409 | + ulong quic_tile_cnt = fd_topo_tile_name_cnt( topo, "quic" ); |
| 410 | + |
| 411 | + cur->in.turbine = fd_gui_metrics_turbine_total_ingress_bytes( topo, shred_tile_cnt ); |
| 412 | + cur->out.turbine = fd_gui_metrics_turbine_total_egress_bytes( topo, net_tile_cnt ); |
| 413 | + cur->in.repair = fd_gui_metrics_repair_total_ingress_bytes( topo, shred_tile_cnt ); |
| 414 | + cur->out.repair = fd_gui_metrics_repair_total_egress_bytes( topo, net_tile_cnt ); |
| 415 | + cur->in.gossip = fd_gui_metrics_gossip_total_ingress_bytes( topo, gossvf_tile_cnt ); |
| 416 | + cur->out.gossip = fd_gui_metrics_gosip_total_egress_bytes( topo, gossip_tile_cnt ); |
| 417 | + cur->in.tpu = fd_gui_metrics_tpu_total_ingress_bytes( topo, quic_tile_cnt ); |
| 418 | + cur->out.tpu = fd_gui_metrics_tpu_total_egress_bytes( topo, net_tile_cnt ); |
| 419 | + cur->in.metric = fd_gui_metrics_metric_total_ingress_bytes( topo ); |
| 420 | + cur->out.metric = fd_gui_metrics_metric_total_egress_bytes( topo ); |
| 421 | +} |
| 422 | + |
400 | 423 | /* Snapshot all of the data from metrics to construct a view of the |
401 | 424 | transaction waterfall. |
402 | 425 |
|
@@ -828,6 +851,10 @@ fd_gui_poll( fd_gui_t * gui, long now ) { |
828 | 851 | fd_gui_printf_live_txn_waterfall( gui, gui->summary.txn_waterfall_reference, gui->summary.txn_waterfall_current, 0UL /* TODO: REAL NEXT LEADER SLOT */ ); |
829 | 852 | fd_http_server_ws_broadcast( gui->http ); |
830 | 853 |
|
| 854 | + fd_gui_network_stats_snap( gui, gui->summary.network_stats_current ); |
| 855 | + fd_gui_printf_live_network_metrics( gui, gui->summary.network_stats_current ); |
| 856 | + fd_http_server_ws_broadcast( gui->http ); |
| 857 | + |
831 | 858 | *gui->summary.tile_stats_reference = *gui->summary.tile_stats_current; |
832 | 859 | fd_gui_tile_stats_snap( gui, gui->summary.txn_waterfall_current, gui->summary.tile_stats_current, now ); |
833 | 860 | fd_gui_printf_live_tile_stats( gui, gui->summary.tile_stats_reference, gui->summary.tile_stats_current ); |
|
0 commit comments