Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

API Reference

The guide and the rustdoc split the work: the guide explains why and when to reach for an API; the rustdoc carries signatures, field semantics, and edge cases. The complete rustdoc for every ktstr workspace crate is published at ktstr.dev/rustdoc/ktstr, and ktstr::prelude re-exports everything a test author needs.

You want toReach forRustdocGuide chapter
Declare a test#[ktstr_test]attr.ktstr_testThe #[ktstr_test] Attribute
Declare a schedulerdeclare_scheduler!, Scheduler, SchedulerSpecmacro.declare_scheduler, test_supportScheduler Definitions
Drive a scenarioCtx, scenarios::*scenarioScenarios, Custom Scenarios
Compose steps and opsStep, Op, HoldSpec, Backdropscenario::opsOps, Steps, and Backdrop
Shape cgroups and cpusetsCgroupDef, CpusetSpecscenario::opsTopology
Check resultsAssert, AssertResult, Verdict, claim!assertChecking, Customize Checking
Gate performance regressionsPerfDeltaAssertiontest_supportAssertable Metrics
Generate loadWorkType, WorkloadConfig, WorkloadHandleworkloadWork Types, Workers and Workloads
Run guest binaries#[derive(Payload)], Payloadderive.PayloadPayloads and Included Files
Capture guest stateSnapshot, SnapshotBridge, Sample, SampleSeriesscenario::snapshot, scenario::sampleSnapshots, Temporal Assertions

The #[ktstr_test] attribute’s arguments (topology dimensions, thresholds, execution flags) are documented in the macro reference chapter and on the attribute’s own rustdoc page; the macro itself lives in the ktstr-macros crate and is re-exported at the crate root.