Skip to main content

Module random

Module random 

Source
Expand description

Non-deterministic random data generators for prototyping and testing.

These nodes use thread-local RNG and produce different outputs on each call regardless of input coordinates. They are NOT reproducible across runs. Use the deterministic hash-based nodes for production workloads.

All “random” nodes are 0→1 (no inputs) to make the non-deterministic nature clear. The “hashed line/extract” nodes are 1→1 (deterministic, coordinate-driven) and use the bundled text data files.

Structs§

Charset
Expanded character set for random_string, parsed once per node instance from the charset spec via parse.
HashedLineToString
Select a deterministic line from a bundled text source using the input hash as an index. Deterministic: same input → same line.
HashedLines
Pre-split list of non-empty lines from a bundled text source. Derived state for hashed_line_to_string, computed once per node instance via split_lines.
HashedLoremExtract
Extract a substring from bundled lorem ipsum text using a hash-based offset. Deterministic: same input → same extract.
RandomBool
Random boolean with probability of true.
RandomBytes
Random byte buffer.
RandomF64
Random f64 in [min, max).
RandomRange
Random u64 in [min, max). range = max - min is computed inline per call (non-det node, per-call subtraction is noise).
RandomString
Random string from a character set.

Statics§

CAREERS
Career titles
COMPANIES
Company names
LASTNAMES
Last names
LOREM_IPSUM
~93KB of Lorem Ipsum text from nosqlbench’s data files.
NAMES
First names
VARIABLE_WORDS
Variable/metric words