19 #ifndef RIPPLE_TEST_CSF_SUBMITTERS_H_INCLUDED
20 #define RIPPLE_TEST_CSF_SUBMITTERS_H_INCLUDED
22 #include <test/csf/Peer.h>
23 #include <test/csf/Scheduler.h>
24 #include <test/csf/SimTime.h>
25 #include <test/csf/Tx.h>
64 template <
class Distribution,
class Generator,
class Selector>
85 return SimDuration{
static_cast<SimDuration::rep
>(t)};
112 template <
class Distribution,
class Generator,
class Selector>
113 Submitter<Distribution, Generator, Selector>
123 dist, start, end, sel, s, g);
typename SimClock::time_point SimTime
Represents rate as a count/duration.
static std::enable_if_t< std::is_arithmetic< T >::value, SimDuration > asDuration(T t)
Submits transactions to a specified peer.
Invocable that returns random samples from a range according to a discrete distribution.
Submitter< Distribution, Generator, Selector > makeSubmitter(Distribution dist, SimTime start, SimTime end, Selector &sel, Scheduler &s, Generator &g)
Simulated discrete-event scheduler.
static SimDuration asDuration(SimDuration d)
cancel_token in(duration const &delay, Function &&f)
Schedule an event after a specified duration passes.
Submitter(Distribution dist, SimTime start, SimTime end, Selector &selector, Scheduler &s, Generator &g)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
cancel_token at(time_point const &when, Function &&f)
Schedule an event at a specific time.
typename SimClock::duration SimDuration
time_point now() const
Return the current network time.