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

Classes | |
| class | TrafficStats |
Public Types | |
| enum class | Category : std::size_t { Base , Cluster , Overlay , Manifests , Transaction , TransactionDuplicate , Proposal , ProposalUntrusted , ProposalDuplicate , Validation , ValidationUntrusted , ValidationDuplicate , Validatorlist , Squelch , SquelchSuppressed , SquelchIgnored , GetSet , ShareSet , LdTscGet , LdTscShare , LdTxnGet , LdTxnShare , LdAsnGet , LdAsnShare , LdGet , LdShare , GlTscShare , GlTscGet , GlTxnShare , GlTxnGet , GlAsnShare , GlAsnGet , GlShare , GlGet , ShareHashLedger , GetHashLedger , ShareHashTx , GetHashTx , ShareHashTxnode , GetHashTxnode , ShareHashAsnode , GetHashAsnode , ShareCasObject , GetCasObject , ShareFetchPack , GetFetchPack , GetTransactions , ShareHash , GetHash , ProofPathRequest , ProofPathResponse , ReplayDeltaRequest , ReplayDeltaResponse , HaveTransactions , RequestedTransactions , 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 | toString (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 29 of file TrafficCount.h.
|
strong |
Definition at line 66 of file TrafficCount.h.
|
default |
|
static |
Given a protocol message, determine which traffic category it belongs to.
Definition at line 31 of file TrafficCount.cpp.
| void xrpl::TrafficCount::addCount | ( | Category | cat, |
| bool | inbound, | ||
| int | bytes ) |
Account for traffic associated with the given category.
Definition at line 193 of file TrafficCount.h.
|
nodiscard |
An up-to-date copy of all the counters.
Definition at line 221 of file TrafficCount.h.
|
static |
Definition at line 227 of file TrafficCount.h.
|
protected |
Definition at line 294 of file TrafficCount.h.