Skip to main content

Module counters

Module counters 

Source
Expand description

Process-global packet-flow diagnostic counters for the throughput stress harness.

These counters were originally defined in hopr-utils::parallelize, but they encode HOPR session/routing domain concepts (session inbox, routing resolution, SPHINX encode stage) rather than generic parallelisation primitives. They therefore live here in the transport-session crate instead of the generic hopr-utilities crate.

Each counter is a plain process-global atomic, incremented on hot paths across the transport/session pipeline and read (as deltas) by the load generator. They are not gated on any feature so they are available in every build, including test builds.

Statics§

APP_INCOMING_TIMEOUT_DROPS
Cumulative count of packets dropped by forward_to_timeout(app_incoming) at the ingress pipeline because tx_from_protocol was full for longer than QUEUE_SEND_TIMEOUT (50 ms).
DISPATCH_MESSAGE_CALLS
Cumulative count of calls to smgr.dispatch_message in SessionsManagement(0). Non-zero means packets are reaching the session manager dispatcher.
ENCODE_STAGE_ENTRIES
Cumulative count of packets that entered the SPHINX encode stage (spawn_encode_blocking called).
ROUTING_RESOLUTION_ATTEMPTS
Cumulative count of packets that successfully entered the routing resolution stage.
ROUTING_RESOLUTION_FAILURES
Cumulative count of packets that failed path/routing resolution before encoding.
ROUTING_RESOLUTION_SURB_TIMEOUTS
Cumulative count of outgoing packets dropped because their return route still had no SURB when the resolution wait ran out.
SESSION_INBOX_DROPS
Cumulative count of application data packets dropped because the session inbox channel was full (try_send returned TrySendError::Full).
SESSION_UNKNOWN_DATA_DROPS
Cumulative count of data packets dropped because no matching session slot was found in the session manager (UnknownData / unestablished-session path).
SESSION_UNRELATED_DATA_DISPATCHES
Cumulative count of data packets dispatched as “unrelated” — reached dispatch_message but matched neither the session protocol tag nor any session application tag.

Functions§

app_incoming_timeout_drop_count
Returns the cumulative app-incoming timeout drop count.
dispatch_message_call_count
Returns the cumulative dispatch_message call count.
encode_stage_entry_count
Returns the cumulative encode stage entry count.
routing_resolution_attempt_count
Returns the cumulative routing resolution attempt count.
routing_resolution_failure_count
Returns the cumulative routing resolution failure count.
routing_resolution_surb_timeout_count
Returns the cumulative count of packets dropped after waiting in vain for a return SURB.
session_inbox_drop_count
Returns the cumulative session inbox drop count.
session_unknown_data_drop_count
Returns the cumulative UnknownData drop count.
session_unrelated_dispatch_count
Returns the cumulative unrelated dispatch count.