Module record

Module record 

Source
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§

CompletedRunStats
Statistics for a normal test run that finished (completed or cancelled).
ComponentSizes
Compressed and uncompressed sizes for a single component.
ComputedRerunInfo
Result of computing outstanding and passing tests from a recorded run.
DisplayPrunePlan
A display wrapper for PrunePlan.
DisplayPruneResult
A display wrapper for PruneResult.
DisplayRecordedRunInfo
A display wrapper for RecordedRunInfo.
DisplayRecordedRunInfoDetailed
A detailed display wrapper for RecordedRunInfo.
DisplayRunList
A display wrapper for a list of recorded runs.
ExclusiveLockedRunStore
A run store that has been locked for exclusive access.
OutputFileName
A validated output file name in the zip archive.
PrunePlan
The result of computing a prune plan (dry-run mode).
PruneResult
The result of a pruning operation.
RecordEventIter
Iterator over recorded events.
RecordFinalizeResult
Result of finalizing a recording session.
RecordOpts
Options that affect how test results are interpreted during replay.
RecordReader
Reader for a recorded test run.
RecordRetentionPolicy
A retention policy for recorded test runs.
RecordSession
Manages the full lifecycle of a recording session.
RecordSessionConfig
Configuration for creating a recording session.
RecordSessionSetup
Result of setting up a recording session.
RecordedRunInfo
Information about a recorded run.
RecordedSizes
Sizes broken down by component (log and store).
ResolveRunIdResult
Result of looking up the most recent replayable run.
RunIdIndex
An index of run IDs enabling efficient prefix lookup and shortest unique prefix computation.
RunListAlignment
Alignment information for displaying a list of runs.
RunRecorder
Records a single test run to disk.
RunStore
Manages the storage of recorded test runs.
RunStoreSnapshot
A snapshot of run store data.
SharedLockedRunStore
A run store that has been locked for shared (read-only) access.
ShortestRunIdPrefix
The shortest unique prefix for a run ID, split into the unique prefix and remaining portion.
SnapshotWithReplayability
A snapshot paired with precomputed replayability status for all runs.
StoreRunsDir
A reference to the runs directory in a run store.
StoreSizes
Compressed and uncompressed sizes for storage, broken down by component.
StressCompletedRunStats
Statistics for a stress test run that finished (completed or cancelled).
StressIndexSummary
Serializable version of StressIndex.
Styles
Styles for displaying record store information.
TestEventSummary
A serializable form of a test event.

Enums§

CoreEventKind
Events that don’t carry test output.
NonReplayableReason
A definite reason why a run cannot be replayed.
OutputEventKind
Events that carry test output.
PruneKind
Whether pruning was explicit (user-requested) or implicit (automatic).
RecordFinalizeWarning
Non-fatal warning during recording finalization.
RecordedRunStatus
Status and statistics for a recorded run.
ReplayabilityStatus
The result of checking whether a run can be replayed.
RunIdSelector
Selector for identifying a run, either the most recent or by prefix.
StressConditionSummary
Serializable version of StressCondition.
TestEventKindSummary
The kind of test event.
ZipStoreOutput
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.