-
Notifications
You must be signed in to change notification settings - Fork 330
metrics, bank, pack, quic: use MACRO_CNT in def #6543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,7 @@ | |
|
||
#include "fd_quic_common.h" | ||
#include "fd_quic_enum.h" | ||
#include "../../disco/metrics/generated/fd_metrics_quic.h" | ||
|
||
#include "../aio/fd_aio.h" | ||
#include "../tls/fd_tls.h" | ||
|
@@ -313,32 +314,32 @@ union fd_quic_metrics { | |
ulong retry_tx_cnt; /* number of Retry packets sent */ | ||
|
||
/* Conn metrics */ | ||
ulong conn_alloc_cnt; /* number of conns currently allocated */ | ||
ulong conn_created_cnt; /* number of conns created */ | ||
ulong conn_closed_cnt; /* number of conns gracefully closed */ | ||
ulong conn_aborted_cnt; /* number of conns aborted */ | ||
ulong conn_timeout_cnt; /* number of conns timed out */ | ||
ulong conn_retry_cnt; /* number of conns established with retry */ | ||
ulong conn_err_no_slots_cnt; /* number of conns that failed to create due to lack of slots */ | ||
ulong conn_err_retry_fail_cnt; /* number of conns that failed during retry (e.g. invalid token) */ | ||
ulong conn_state_cnt[ 8 ]; /* current number of conns in each state */ | ||
ulong conn_alloc_cnt; /* number of conns currently allocated */ | ||
ulong conn_created_cnt; /* number of conns created */ | ||
ulong conn_closed_cnt; /* number of conns gracefully closed */ | ||
ulong conn_aborted_cnt; /* number of conns aborted */ | ||
ulong conn_timeout_cnt; /* number of conns timed out */ | ||
ulong conn_retry_cnt; /* number of conns established with retry */ | ||
ulong conn_err_no_slots_cnt; /* number of conns that failed to create due to lack of slots */ | ||
ulong conn_err_retry_fail_cnt; /* number of conns that failed during retry (e.g. invalid token) */ | ||
ulong conn_state_cnt[ FD_METRICS_ENUM_QUIC_CONN_STATE_CNT ]; /* current number of conns in each state */ | ||
|
||
/* Packet metrics */ | ||
ulong pkt_net_hdr_err_cnt; /* number of packets dropped due to weird IPv4/UDP headers */ | ||
ulong pkt_quic_hdr_err_cnt; /* number of packets dropped due to weird QUIC header */ | ||
ulong pkt_undersz_cnt; /* number of QUIC packets dropped due to being too small */ | ||
ulong pkt_oversz_cnt; /* number of QUIC packets dropped due to being too large */ | ||
ulong pkt_decrypt_fail_cnt[4]; /* number of packets that failed decryption due to auth tag */ | ||
ulong pkt_no_key_cnt[4]; /* number of packets that failed decryption due to missing key */ | ||
ulong pkt_no_conn_cnt[4]; /* number of packets with unknown conn ID (initial, retry, hs, 1-RTT) */ | ||
ulong frame_tx_alloc_cnt[3]; /* number of pkt_meta alloc successes, fails for empty pool, fails at conn max */ | ||
ulong pkt_verneg_cnt; /* number of QUIC version negotiation packets or packets with wrong version */ | ||
ulong pkt_retransmissions_cnt; /* number of pkt_meta retries */ | ||
ulong initial_token_len_cnt[3]; /* number of Initial packets grouped by token length */ | ||
ulong pkt_net_hdr_err_cnt; /* number of packets dropped due to weird IPv4/UDP headers */ | ||
ulong pkt_quic_hdr_err_cnt; /* number of packets dropped due to weird QUIC header */ | ||
ulong pkt_undersz_cnt; /* number of QUIC packets dropped due to being too small */ | ||
ulong pkt_oversz_cnt; /* number of QUIC packets dropped due to being too large */ | ||
ulong pkt_decrypt_fail_cnt[ FD_METRICS_ENUM_QUIC_ENC_LEVEL_CNT ]; /* number of packets that failed decryption due to auth tag */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Number of encryption levels shouldn't come from metrics. Use FD_QUIC_NUM_ENC_LEVELS There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we should ASSERT somewhere that they are equal There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually - FD_METRICS_ENUM_QUIC_ENC_LEVEL_CNT is fine. Ignore me There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i like the idea of adding an ASSERT to check they are equal There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
ulong pkt_no_key_cnt[ FD_METRICS_ENUM_QUIC_ENC_LEVEL_CNT ]; /* number of packets that failed decryption due to missing key */ | ||
ulong pkt_no_conn_cnt[ FD_METRICS_ENUM_QUIC_PKT_HANDLE_CNT ]; /* number of packets with unknown conn ID (initial, retry, hs, 1-RTT) */ | ||
ulong frame_tx_alloc_cnt[ FD_METRICS_ENUM_FRAME_TX_ALLOC_RESULT_CNT ]; /* number of pkt_meta alloc successes, fails for empty pool, fails at conn max */ | ||
ulong pkt_verneg_cnt; /* number of QUIC version negotiation packets or packets with wrong version */ | ||
ulong pkt_retransmissions_cnt; /* number of pkt_meta retries */ | ||
ulong initial_token_len_cnt[FD_METRICS_ENUM_QUIC_INITIAL_TOKEN_LEN_CNT]; /* number of Initial packets grouped by token length */ | ||
|
||
/* Frame metrics */ | ||
ulong frame_rx_cnt[ 22 ]; /* number of frames received (indexed by implementation-defined IDs) */ | ||
ulong frame_rx_err_cnt; /* number of frames failed */ | ||
ulong frame_rx_cnt[ FD_METRICS_ENUM_QUIC_FRAME_TYPE_CNT ]; /* number of frames received (indexed by implementation-defined IDs) */ | ||
ulong frame_rx_err_cnt; /* number of frames failed */ | ||
|
||
/* Handshake metrics */ | ||
ulong hs_created_cnt; /* number of handshake flows created */ | ||
|
@@ -353,7 +354,7 @@ union fd_quic_metrics { | |
ulong stream_rx_byte_cnt; /* total stream payload bytes received */ | ||
|
||
/* ACK metrics */ | ||
ulong ack_tx[ 5 ]; | ||
ulong ack_tx[ FD_METRICS_ENUM_QUIC_ACK_TX_CNT ]; | ||
|
||
/* Performance metrics */ | ||
fd_histf_t service_duration[ 1 ]; /* time spent in service */ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is actually TRANSACTION_ERROR_CNT I believe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both
FD_METRICS_COUNTER_BANK_TRANSACTION_RESULT_CNT
andFD_METRICS_ENUM_TRANSACTION_ERROR_CNT
map to the correct value,41
.transaction_result
is used inFD_MCNT_ENUM_COPY( BANK, TRANSACTION_RESULT, ctx->metrics.transaction_result );
soFD_METRICS_COUNTER_BANK_TRANSACTION_RESULT_CNT
definitely aligns with that.I do agree that it's confusing to have
..._RESULT
as well as..._ERROR
, but that's how it's defined in metrics.xml.I don't think it would make sense to change the enum name to
TransactionResult
as that would deviate from agave and clash withTransactionError
from bankf tile.Should I instead rename the field to
transaction_err
and the counter name in metrics.xml toTransactionError
?