Skip to content

Commit cc21b57

Browse files
committed
gui: add bundle tile card to frontend
1 parent 6162525 commit cc21b57

File tree

11 files changed

+243
-261
lines changed

11 files changed

+243
-261
lines changed

book/api/websocket.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,8 @@ potential underflow.
672672
|----------------------------|----------|-------------|
673673
| net_in | `number` | Network ingress bytes per second (W) |
674674
| quic | `number` | Active QUIC connections (P) |
675-
| bundle_rtt_smoothed_millis | `number` | The round-trip time for grpc messages sent to the bundle server. These are mostly ping messages when the validator is not leader. An exponential moving average ( avg = 1/8 val + 7/8 avg ) is used to filter the signal |
676-
| bundle_rx_delay_millis_p90 | `number` | An estimate of the 90th percentile of the one-way delay of a bundle dispatched from the bundle server. Only samples since the start of the most recent leader rotation for this validator are used to compute the percentile |
675+
| bundle_rtt_smoothed_millis | `number` | The round-trip time for grpc messages sent to the bundle server. These are mostly ping-pong messages. An exponential moving average ( avg = 1/8 val + 7/8 avg ) is used to filter the signal (W) |
676+
| bundle_rx_delay_millis_p90 | `number` | An estimate of the 90th percentile of the one-way delay of a bundle dispatched from the bundle server (W) |
677677
| verify | `number` | Fraction of transactions that failed sigverify (W) |
678678
| dedup | `number` | Fraction of transactions deduplicated (W) |
679679
| pack | `number` | Fraction of pack buffer filled (P) |

src/disco/gui/dist/LICENSE_DEPENDENCIES

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1557,6 +1557,41 @@ SOFTWARE.
15571557

15581558
---
15591559

1560+
Name: zod
1561+
Version: 3.24.2
1562+
License: MIT
1563+
Private: false
1564+
Description: TypeScript-first schema declaration and validation library with static type inference
1565+
Repository: git+https://github.com/colinhacks/zod.git
1566+
Homepage: https://zod.dev
1567+
Author: Colin McDonnell <[email protected]>
1568+
License Copyright:
1569+
===
1570+
1571+
MIT License
1572+
1573+
Copyright (c) 2020 Colin McDonnell
1574+
1575+
Permission is hereby granted, free of charge, to any person obtaining a copy
1576+
of this software and associated documentation files (the "Software"), to deal
1577+
in the Software without restriction, including without limitation the rights
1578+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1579+
copies of the Software, and to permit persons to whom the Software is
1580+
furnished to do so, subject to the following conditions:
1581+
1582+
The above copyright notice and this permission notice shall be included in all
1583+
copies or substantial portions of the Software.
1584+
1585+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1586+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1587+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1588+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1589+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1590+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1591+
SOFTWARE.
1592+
1593+
---
1594+
15601595
Name: @radix-ui/react-icons
15611596
Version: 1.3.2
15621597
License: MIT
@@ -1798,41 +1833,6 @@ SOFTWARE.
17981833

17991834
---
18001835

1801-
Name: zod
1802-
Version: 3.24.2
1803-
License: MIT
1804-
Private: false
1805-
Description: TypeScript-first schema declaration and validation library with static type inference
1806-
Repository: git+https://github.com/colinhacks/zod.git
1807-
Homepage: https://zod.dev
1808-
Author: Colin McDonnell <[email protected]>
1809-
License Copyright:
1810-
===
1811-
1812-
MIT License
1813-
1814-
Copyright (c) 2020 Colin McDonnell
1815-
1816-
Permission is hereby granted, free of charge, to any person obtaining a copy
1817-
of this software and associated documentation files (the "Software"), to deal
1818-
in the Software without restriction, including without limitation the rights
1819-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1820-
copies of the Software, and to permit persons to whom the Software is
1821-
furnished to do so, subject to the following conditions:
1822-
1823-
The above copyright notice and this permission notice shall be included in all
1824-
copies or substantial portions of the Software.
1825-
1826-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1827-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1828-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1829-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1830-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1831-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1832-
SOFTWARE.
1833-
1834-
---
1835-
18361836
Name: @tanstack/zod-adapter
18371837
Version: 1.114.25
18381838
License: MIT

src/disco/gui/dist/assets/index-Bf4zdtQG.css renamed to src/disco/gui/dist/assets/index-0SRwUG3l.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/disco/gui/dist/assets/index-CCPH-jfz.js renamed to src/disco/gui/dist/assets/index-Bd3-fDz1.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/disco/gui/dist/assets/index-CK5fEpqt.js

Lines changed: 189 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/disco/gui/dist/assets/index-DQkNX9Hz.js

Lines changed: 0 additions & 189 deletions
This file was deleted.

src/disco/gui/dist/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<link rel="preload" type="image/svg+xml" as="image" href="/assets/firedancer-D_J0EzUc.svg" />
1010
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1111
<title>Firedancer</title>
12-
<script type="module" crossorigin src="/assets/index-DQkNX9Hz.js"></script>
13-
<link rel="stylesheet" crossorigin href="/assets/index-Bf4zdtQG.css">
12+
<script type="module" crossorigin src="/assets/index-CK5fEpqt.js"></script>
13+
<link rel="stylesheet" crossorigin href="/assets/index-0SRwUG3l.css">
1414
</head>
1515

1616
<body>

src/disco/gui/fd_gui.c

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,6 @@ fd_gui_new( void * shmem,
132132
for( ulong i=0UL; i<FD_GUI_SLOTS_CNT; i++ ) gui->slots[ i ]->slot = ULONG_MAX;
133133
gui->pack_txn_idx = 0UL;
134134

135-
fd_histf_new( gui->bundle_rx_delay_hist_current, FD_MHIST_MIN( BUNDLE, MESSAGE_RX_DELAY_NANOS ), FD_MHIST_MAX( BUNDLE, MESSAGE_RX_DELAY_NANOS ) );
136-
fd_histf_new( gui->bundle_rx_delay_hist_reference, FD_MHIST_MIN( BUNDLE, MESSAGE_RX_DELAY_NANOS ), FD_MHIST_MAX( BUNDLE, MESSAGE_RX_DELAY_NANOS ) );
137-
138135
return gui;
139136
}
140137

@@ -505,8 +502,9 @@ fd_gui_tile_stats_snap( fd_gui_t * gui,
505502
volatile ulong * bundle_metrics = fd_metrics_tile( bundle->metrics );
506503
stats->bundle_rtt_smoothed_nanos = bundle_metrics[ MIDX( GAUGE, BUNDLE, RTT_SMOOTHED ) ];
507504

508-
gui->bundle_rx_delay_hist_current->sum = bundle_metrics[ MIDX( HISTOGRAM, BUNDLE, MESSAGE_RX_DELAY_NANOS ) + FD_HISTF_BUCKET_CNT ];
509-
for( ulong b=0; b<FD_HISTF_BUCKET_CNT; b++ ) gui->bundle_rx_delay_hist_current->counts[ b ] = bundle_metrics[ MIDX( HISTOGRAM, BUNDLE, MESSAGE_RX_DELAY_NANOS ) + b ];
505+
fd_histf_new( &stats->bundle_rx_delay_hist, FD_MHIST_MIN( BUNDLE, MESSAGE_RX_DELAY_NANOS ), FD_MHIST_MAX( BUNDLE, MESSAGE_RX_DELAY_NANOS ) );
506+
stats->bundle_rx_delay_hist.sum = bundle_metrics[ MIDX( HISTOGRAM, BUNDLE, MESSAGE_RX_DELAY_NANOS ) + FD_HISTF_BUCKET_CNT ];
507+
for( ulong b=0; b<FD_HISTF_BUCKET_CNT; b++ ) stats->bundle_rx_delay_hist.counts[ b ] = bundle_metrics[ MIDX( HISTOGRAM, BUNDLE, MESSAGE_RX_DELAY_NANOS ) + b ];
510508
}
511509

512510
stats->verify_drop_cnt = waterfall->out.verify_duplicate +
@@ -1741,20 +1739,6 @@ fd_gui_became_leader( fd_gui_t * gui,
17411739
slot->txs.leader_start_time = start_time_nanos;
17421740
slot->txs.leader_end_time = end_time_nanos;
17431741
if( FD_LIKELY( slot->txs.microblocks_upper_bound==USHORT_MAX ) ) slot->txs.microblocks_upper_bound = (ushort)max_microblocks;
1744-
1745-
// snapshot of bundle rx histogram at leader rotation start
1746-
ulong bundle_tile_idx = fd_topo_find_tile( gui->topo, "bundle", 0UL );
1747-
if( FD_UNLIKELY( bundle_tile_idx!=ULONG_MAX && _slot % 4 == 0 ) ) {
1748-
fd_topo_tile_t const * bundle = &gui->topo->tiles[ bundle_tile_idx ];
1749-
volatile ulong * bundle_metrics = fd_metrics_tile( bundle->metrics );
1750-
(void)bundle_metrics;
1751-
1752-
gui->bundle_rx_delay_hist_current->sum = bundle_metrics[ MIDX( HISTOGRAM, BUNDLE, MESSAGE_RX_DELAY_NANOS ) + FD_HISTF_BUCKET_CNT ];
1753-
for( ulong b=0; b<FD_HISTF_BUCKET_CNT; b++ ) gui->bundle_rx_delay_hist_current->counts[ b ] = bundle_metrics[ MIDX( HISTOGRAM, BUNDLE, MESSAGE_RX_DELAY_NANOS ) + b ];
1754-
1755-
gui->bundle_rx_delay_hist_reference->sum = bundle_metrics[ MIDX( HISTOGRAM, BUNDLE, MESSAGE_RX_DELAY_NANOS ) + FD_HISTF_BUCKET_CNT ];
1756-
for( ulong b=0; b<FD_HISTF_BUCKET_CNT; b++ ) gui->bundle_rx_delay_hist_reference->counts[ b ] = bundle_metrics[ MIDX( HISTOGRAM, BUNDLE, MESSAGE_RX_DELAY_NANOS ) + b ];
1757-
}
17581742
}
17591743

17601744
void

src/disco/gui/fd_gui.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ struct fd_gui_tile_stats {
164164

165165
ulong net_in_rx_bytes; /* Number of bytes received by the net or sock tile*/
166166
ulong quic_conn_cnt; /* Number of active QUIC connections */
167+
fd_histf_t bundle_rx_delay_hist; /* Histogram of bundle rx delay */
167168
ulong bundle_rtt_smoothed_nanos; /* RTT (nanoseconds) moving average */
168169
ulong verify_drop_cnt; /* Number of transactions dropped by verify tiles */
169170
ulong verify_total_cnt; /* Number of transactions received by verify tiles */
@@ -364,9 +365,6 @@ struct fd_gui {
364365
ulong tile_timers_leader_history_slot[ FD_GUI_TILE_TIMER_LEADER_CNT ];
365366
} summary;
366367

367-
fd_histf_t bundle_rx_delay_hist_reference[ 1 ]; /* histogram snapshot taken at the start of every leader rotation for this validator */
368-
fd_histf_t bundle_rx_delay_hist_current[ 1 ]; /* latest histogram snapshot captured from metrics workspace */
369-
370368
fd_gui_slot_t slots[ FD_GUI_SLOTS_CNT ][ 1 ];
371369

372370
ulong pack_txn_idx; /* The pack index of the most recently received transaction */

src/disco/gui/fd_gui_printf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ fd_gui_printf_tile_stats( fd_gui_t * gui,
615615
jsonp_double( gui, "bundle_rtt_smoothed_millis", (double)(cur->bundle_rtt_smoothed_nanos) / 1000000.0 );
616616

617617
fd_histf_t bundle_rx_delay_hist_delta[ 1 ];
618-
fd_histf_subtract( gui->bundle_rx_delay_hist_current, gui->bundle_rx_delay_hist_reference, bundle_rx_delay_hist_delta );
618+
fd_histf_subtract( &cur->bundle_rx_delay_hist, &prev->bundle_rx_delay_hist, bundle_rx_delay_hist_delta );
619619
ulong bundle_rx_delay_nanos_p90 = fd_histf_percentile( bundle_rx_delay_hist_delta, 90U, ULONG_MAX );
620620
jsonp_double( gui, "bundle_rx_delay_millis_p90", fd_double_if(bundle_rx_delay_nanos_p90==ULONG_MAX, 0.0, (double)(bundle_rx_delay_nanos_p90) / 1000000.0 ));
621621

0 commit comments

Comments
 (0)