Expand description
Recording infrastructure for nextest runs.
This module provides functionality to record test runs to disk for later inspection and replay. The recording captures test events, outputs, and metadata in a structured archive format.
§Architecture
The recording system consists of:
RunStore: Manages the directory where recordings are stored, handling locking and the list of recorded runs.RunRecorder: Writes a single run’s data to disk, including metadata and events.RecordReader: Reads a recorded run from disk for replay or inspection.records_cache_dir: Returns the platform-specific cache directory for recordings.
§Archive format
Each run is stored in a directory named by its UUID, containing:
store.zip: A zstd-compressed archive containing metadata and test outputs.run.log.zst: A zstd-compressed JSON Lines file of test events.
Re-exports§
pub use format::RunsJsonWritePermission;pub use replay::ReplayContext;pub use replay::ReplayConversionError;pub use replay::ReplayHeader;pub use replay::ReplayReporter;pub use replay::ReplayReporterBuilder;
Modules§
- dicts
- Pre-trained zstd dictionaries for compressing test output.
- format
- Archive format metadata shared between recorder and reader.
- replay
- Replay infrastructure for recorded test runs.
Structs§
- Completed
RunStats - Statistics for a normal test run that finished (completed or cancelled).
- Component
Sizes - Compressed and uncompressed sizes for a single component.
- Computed
Rerun Info - Result of computing outstanding and passing tests from a recorded run.
- Display
Prune Plan - A display wrapper for
PrunePlan. - Display
Prune Result - A display wrapper for
PruneResult. - Display
Recorded RunInfo - A display wrapper for
RecordedRunInfo. - Display
Recorded RunInfo Detailed - A detailed display wrapper for
RecordedRunInfo. - Display
RunList - A display wrapper for a list of recorded runs.
- Exclusive
Locked RunStore - A run store that has been locked for exclusive access.
- Output
File Name - A validated output file name in the zip archive.
- Prune
Plan - The result of computing a prune plan (dry-run mode).
- Prune
Result - The result of a pruning operation.
- Record
Event Iter - Iterator over recorded events.
- Record
Finalize Result - Result of finalizing a recording session.
- Record
Opts - Options that affect how test results are interpreted during replay.
- Record
Reader - Reader for a recorded test run.
- Record
Retention Policy - A retention policy for recorded test runs.
- Record
Session - Manages the full lifecycle of a recording session.
- Record
Session Config - Configuration for creating a recording session.
- Record
Session Setup - Result of setting up a recording session.
- Recorded
RunInfo - Information about a recorded run.
- Recorded
Sizes - Sizes broken down by component (log and store).
- Resolve
RunId Result - Result of looking up the most recent replayable run.
- RunId
Index - An index of run IDs enabling efficient prefix lookup and shortest unique prefix computation.
- RunList
Alignment - Alignment information for displaying a list of runs.
- RunRecorder
- Records a single test run to disk.
- RunStore
- Manages the storage of recorded test runs.
- RunStore
Snapshot - A snapshot of run store data.
- Shared
Locked RunStore - A run store that has been locked for shared (read-only) access.
- Shortest
RunId Prefix - The shortest unique prefix for a run ID, split into the unique prefix and remaining portion.
- Snapshot
With Replayability - A snapshot paired with precomputed replayability status for all runs.
- Store
Runs Dir - A reference to the runs directory in a run store.
- Store
Sizes - Compressed and uncompressed sizes for storage, broken down by component.
- Stress
Completed RunStats - Statistics for a stress test run that finished (completed or cancelled).
- Stress
Index Summary - Serializable version of
StressIndex. - Styles
- Styles for displaying record store information.
- Test
Event Summary - A serializable form of a test event.
Enums§
- Core
Event Kind - Events that don’t carry test output.
- NonReplayable
Reason - A definite reason why a run cannot be replayed.
- Output
Event Kind - Events that carry test output.
- Prune
Kind - Whether pruning was explicit (user-requested) or implicit (automatic).
- Record
Finalize Warning - Non-fatal warning during recording finalization.
- Recorded
RunStatus - Status and statistics for a recorded run.
- Replayability
Status - The result of checking whether a run can be replayed.
- RunId
Selector - Selector for identifying a run, either the most recent or by prefix.
- Stress
Condition Summary - Serializable version of
StressCondition. - Test
Event Kind Summary - The kind of test event.
- ZipStore
Output - Output stored as a reference to a file in the zip archive.
Constants§
- NEXTEST_
CACHE_ DIR_ ENV - Environment variable to override the nextest cache directory.
Functions§
- records_
cache_ dir - Returns the platform-specific cache directory for nextest records for a workspace.