|
xrpld
|
Deterministic generator of a reproducible sequence of random NodeObjects. More...
#include <NodeStoreBench.h>

Public Member Functions | |
| Sequence (std::uint8_t prefix) | |
| uint256 | key (std::size_t n) |
| std::shared_ptr< NodeObject > | obj (std::size_t n) |
| void | batch (std::size_t n, Batch &b, std::size_t size) |
Private Attributes | |
| beast::xor_shift_engine | gen_ |
| std::uint8_t | prefix_ |
| std::discrete_distribution< std::uint32_t > | dType_ |
| std::uniform_int_distribution< std::uint32_t > | dSize_ |
Static Private Attributes | |
| static constexpr auto | kMinSize = 250 |
| static constexpr auto | kMaxSize = 1250 |
Deterministic generator of a reproducible sequence of random NodeObjects.
Indexing is stable: obj(n) and key(n) always return the same value for a given n, regardless of call order, because the engine is reseeded from n on every call.
Using different prefixes guarantees the two key spaces are disjoint for the fetch-miss workloads.
Definition at line 64 of file NodeStoreBench.h.
|
explicit |
Definition at line 76 of file NodeStoreBench.h.
| uint256 xrpl::node_store::Sequence::key | ( | std::size_t | n | ) |
Definition at line 89 of file NodeStoreBench.h.
| std::shared_ptr< NodeObject > xrpl::node_store::Sequence::obj | ( | std::size_t | n | ) |
Definition at line 101 of file NodeStoreBench.h.
| void xrpl::node_store::Sequence::batch | ( | std::size_t | n, |
| Batch & | b, | ||
| std::size_t | size ) |
Definition at line 116 of file NodeStoreBench.h.
|
staticconstexprprivate |
Definition at line 67 of file NodeStoreBench.h.
|
staticconstexprprivate |
Definition at line 68 of file NodeStoreBench.h.
|
private |
Definition at line 70 of file NodeStoreBench.h.
|
private |
Definition at line 71 of file NodeStoreBench.h.
|
private |
Definition at line 72 of file NodeStoreBench.h.
|
private |
Definition at line 73 of file NodeStoreBench.h.