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.

Author tests

Use the guide for flow and rustdoc for exact signatures.

Find modules

The table maps every common task to the crate API and relevant chapter.

Stay current

Pre-1.0 API details move quickly; rustdoc is the signature source of truth.

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, Projections and 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.