OxL Reference

method disk.r

Probability (0..1) that a write or sync of the node's disk fails (a failed write may leave a torn prefix).

Example:

oxl✓ checked in CI
use std.test { disk }

test sim "every write of storage-1 may fail" seeds 1..=2 {
  disk.fail("storage-1", 0.5)
}
pub(api) static fn r#fail(node: str, p: f64)

Since. 1.0.0-beta

Effects

none declared (pure unless the body says otherwise)

Defined in: std/test/test.oxl:283

See also