ravel
Deterministic simulation testing for C++. Seed a bug, replay it exact.
Loading...
Searching...
No Matches
Public Attributes | List of all members
ravel::DiskFaultSpec Struct Reference

Injectable disk behavior. More...

#include <disk.hpp>

Public Attributes

std::uint64_t capacity_bytes = 1ULL << 30
 Total bytes across all files.
 
VirtualClock::Tick latency_min = 0
 Each operation takes a uniformly random time in [min, max].
 
VirtualClock::Tick latency_max = 0
 The upper end of the range above.
 
double write_error_probability = 0.0
 In [0, 1]. Writes, renames and removes fail with IoError, changing nothing.
 
double sync_error_probability = 0.0
 In [0, 1].
 

Detailed Description

Injectable disk behavior.

Every decision is drawn from the Simulation's VirtualRng, so it replays identically for a given seed.

Member Data Documentation

◆ capacity_bytes

std::uint64_t ravel::DiskFaultSpec::capacity_bytes = 1ULL << 30

Total bytes across all files.

The default (1 GiB) only guards against a stray offset asking for absurd amounts of memory.

◆ sync_error_probability

double ravel::DiskFaultSpec::sync_error_probability = 0.0

In [0, 1].

Syncing a file fails with IoError and drops the data it should have flushed; syncing a directory fails with IoError and changes nothing.


The documentation for this struct was generated from the following file: