rippled
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
ripple::test::csf::TxCollector Struct Reference

Tracks the submission -> accepted -> validated evolution of transactions. More...

Collaboration diagram for ripple::test::csf::TxCollector:
Collaboration graph
[legend]

Classes

struct  Tracker
 

Public Types

using Hist = Histogram< SimTime::duration >
 

Public Member Functions

template<class E >
void on (PeerID, SimTime when, E const &e)
 
void on (PeerID who, SimTime when, SubmitTx const &e)
 
void on (PeerID who, SimTime when, AcceptLedger const &e)
 
void on (PeerID who, SimTime when, FullyValidateLedger const &e)
 
std::size_t orphaned () const
 
std::size_t unvalidated () const
 
template<class T >
void report (SimDuration simDuration, T &log, bool printBreakline=false)
 
template<class T , class Tag >
void csv (SimDuration simDuration, T &log, Tag const &tag, bool printHeaders=false)
 

Public Attributes

std::size_t submitted {0}
 
std::size_t accepted {0}
 
std::size_t validated {0}
 
hash_map< Tx::ID, Trackertxs
 
Hist submitToAccept
 
Hist submitToValidate
 

Detailed Description

Tracks the submission -> accepted -> validated evolution of transactions.

This collector tracks transactions through the network by monitoring the first* time the transaction is seen by any node in the network, or seen by any node's accepted or fully validated ledger.

If transactions submitted to the network do not have unique IDs, this collector will not track subsequent submissions.

Definition at line 173 of file collectors.h.

Member Typedef Documentation

◆ Hist

using ripple::test::csf::TxCollector::Hist = Histogram<SimTime::duration>

Definition at line 194 of file collectors.h.

Member Function Documentation

◆ on() [1/4]

template<class E >
void ripple::test::csf::TxCollector::on ( PeerID  ,
SimTime  when,
E const &  e 
)

Definition at line 201 of file collectors.h.

◆ on() [2/4]

void ripple::test::csf::TxCollector::on ( PeerID  who,
SimTime  when,
SubmitTx const &  e 
)

Definition at line 206 of file collectors.h.

◆ on() [3/4]

void ripple::test::csf::TxCollector::on ( PeerID  who,
SimTime  when,
AcceptLedger const &  e 
)

Definition at line 216 of file collectors.h.

◆ on() [4/4]

void ripple::test::csf::TxCollector::on ( PeerID  who,
SimTime  when,
FullyValidateLedger const &  e 
)

Definition at line 233 of file collectors.h.

◆ orphaned()

std::size_t ripple::test::csf::TxCollector::orphaned ( ) const

Definition at line 253 of file collectors.h.

◆ unvalidated()

std::size_t ripple::test::csf::TxCollector::unvalidated ( ) const

Definition at line 262 of file collectors.h.

◆ report()

template<class T >
void ripple::test::csf::TxCollector::report ( SimDuration  simDuration,
T &  log,
bool  printBreakline = false 
)

Definition at line 271 of file collectors.h.

◆ csv()

template<class T , class Tag >
void ripple::test::csf::TxCollector::csv ( SimDuration  simDuration,
T &  log,
Tag const &  tag,
bool  printHeaders = false 
)

Definition at line 349 of file collectors.h.

Member Data Documentation

◆ submitted

std::size_t ripple::test::csf::TxCollector::submitted {0}

Definition at line 176 of file collectors.h.

◆ accepted

std::size_t ripple::test::csf::TxCollector::accepted {0}

Definition at line 177 of file collectors.h.

◆ validated

std::size_t ripple::test::csf::TxCollector::validated {0}

Definition at line 178 of file collectors.h.

◆ txs

hash_map<Tx::ID, Tracker> ripple::test::csf::TxCollector::txs

Definition at line 192 of file collectors.h.

◆ submitToAccept

Hist ripple::test::csf::TxCollector::submitToAccept

Definition at line 195 of file collectors.h.

◆ submitToValidate

Hist ripple::test::csf::TxCollector::submitToValidate

Definition at line 196 of file collectors.h.