|
rippled
|
TrafficCount is used to count ingress and egress wire bytes and number of messages. More...
#include <TrafficCount.h>

Classes | |
| class | TrafficStats |
Public Types | |
| enum | category : std::size_t { base , cluster , overlay , manifests , transaction , transaction_duplicate , proposal , proposal_untrusted , proposal_duplicate , validation , validation_untrusted , validation_duplicate , validatorlist , squelch , squelch_suppressed , squelch_ignored , get_set , share_set , ld_tsc_get , ld_tsc_share , ld_txn_get , ld_txn_share , ld_asn_get , ld_asn_share , ld_get , ld_share , gl_tsc_share , gl_tsc_get , gl_txn_share , gl_txn_get , gl_asn_share , gl_asn_get , gl_share , gl_get , share_hash_ledger , get_hash_ledger , share_hash_tx , get_hash_tx , share_hash_txnode , get_hash_txnode , share_hash_asnode , get_hash_asnode , share_cas_object , get_cas_object , share_fetch_pack , get_fetch_pack , get_transactions , share_hash , get_hash , proof_path_request , proof_path_response , replay_delta_request , replay_delta_response , have_transactions , requested_transactions , total , unknown } |
Public Member Functions | |
| TrafficCount ()=default | |
| void | addCount (category cat, bool inbound, int bytes) |
| Account for traffic associated with the given category. | |
| auto const & | getCounts () const |
| An up-to-date copy of all the counters. | |
Static Public Member Functions | |
| static category | categorize (::google::protobuf::Message const &message, protocol::MessageType type, bool inbound) |
| Given a protocol message, determine which traffic category it belongs to. | |
| static std::string | to_string (category cat) |
Protected Attributes | |
| std::unordered_map< category, TrafficStats > | counts_ |
TrafficCount is used to count ingress and egress wire bytes and number of messages.
The general intended usage is as follows:
There are two special categories:
Definition at line 49 of file TrafficCount.h.
Definition at line 87 of file TrafficCount.h.
|
default |
|
static |
Given a protocol message, determine which traffic category it belongs to.
Definition at line 52 of file TrafficCount.cpp.
| void ripple::TrafficCount::addCount | ( | category | cat, |
| bool | inbound, | ||
| int | bytes | ||
| ) |
Account for traffic associated with the given category.
Definition at line 214 of file TrafficCount.h.
| auto const & ripple::TrafficCount::getCounts | ( | ) | const |
An up-to-date copy of all the counters.
Definition at line 243 of file TrafficCount.h.
|
static |
Definition at line 249 of file TrafficCount.h.
|
protected |
Definition at line 316 of file TrafficCount.h.