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