Running benchmarks¶
Experimental: This feature is not yet stable
- Enable with: Add
experimental = ["benchmarks"]to.config/nextest.toml, or setNEXTEST_EXPERIMENTAL_BENCHMARKS=1in the environment - Tracking issue: #2874
Nextest supports running benchmarks with the cargo nextest bench command. Using cargo nextest bench can be helpful in case your benchmarks require setup or wrapper scripts.
Supported benchmark harnesses include:
- Criterion.rs
- The default libtest benchmark runner, in nightly Rust.
- Any other benchmark harnesses that follow the custom test harness protocol.
Note
This page is about running benchmarks to measure performance. Benchmarks can also be run in test mode as regular tests via cargo nextest run, without requiring an experimental feature flag. For more, see Criterion benchmarks.
Benchmark-specific settings¶
Since benchmarks typically take longer than tests to run, nextest applies a different set of slow and global timeouts for them. Access these via the bench.slow-timeout and bench.global-timeout settings, respectively.
[profile.default]
# Set a global timeout of 2 hours for benchmarks.
bench.global-timeout = "2h"
[profile.default.overrides]
# Terminate this benchmark after 10 minutes.
filter = "test(bench_commands)"
bench.slow-timeout = { period = "60s", terminate-after = 10 }
The regular slow-timeout and global-timeout settings are ignored for benchmarks.
Options and arguments¶
The output of cargo nextest bench -h:
Build and run benchmarks (experimental)
Usage: cargo nextest bench [OPTIONS] [FILTERS]... [-- <FILTERS_AND_ARGS>...]
Arguments:
[FILTERS]... Test name filters
[FILTERS_AND_ARGS]... Test name filters and emulated test binary arguments
Options:
--color <WHEN> Produce color output: auto, always, never [env: CARGO_TERM_COLOR=always]
[default: auto]
--no-pager Do not pipe output through a pager
-v, --verbose Verbose output [env: NEXTEST_VERBOSE=]
-h, --help Print help (see more with '--help')
Package selection:
-p, --package <PACKAGES> Package to test
--workspace Test all packages in the workspace
--exclude <EXCLUDE> Exclude packages from the test
--all Alias for --workspace (deprecated)
Target selection:
--lib Test only this package's library unit tests
--bin <BIN> Test only the specified binary
--bins Test all binaries
--example <EXAMPLE> Test only the specified example
--examples Test all examples
--test <TEST> Test only the specified test target
--tests Test all targets
--bench <BENCH> Test only the specified bench target
--benches Test all benches
--all-targets Test all targets
Feature selection:
-F, --features <FEATURES> Space or comma separated list of features to activate
--all-features Activate all available features
--no-default-features Do not activate the default feature
Compilation options:
--build-jobs <N> Number of build jobs to run
-r, --release Build artifacts in release mode, with optimizations
--cargo-profile <NAME> Build artifacts with the specified Cargo profile
--target <TRIPLE> Build for the target triple
--target-dir <DIR> Directory for all generated artifacts
--unit-graph Output build graph in JSON (unstable)
--timings[=<FMTS>] Timing output formats (unstable) (comma separated): html, json
Manifest options:
--manifest-path <PATH> Path to Cargo.toml
--frozen Require Cargo.lock and cache are up to date
--locked Require Cargo.lock is up to date
--offline Run without accessing the network
Other Cargo options:
--cargo-quiet... Do not print cargo log messages (specify twice for no Cargo output
at all)
--cargo-verbose... Use cargo verbose output (specify twice for very verbose/build.rs
output)
--ignore-rust-version Ignore rust-version specification in packages
--future-incompat-report Outputs a future incompatibility report at the end of the build
--config <KEY=VALUE> Override a Cargo configuration value
-Z <FLAG> Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for
details
Filter options:
--run-ignored <WHICH> Run ignored tests [possible values: default, only, all]
--partition <PARTITION> Test partition, e.g. hash:1/2 or count:2/3
-E, --filterset <EXPR> Test filterset (see
https://nexte.st/docs/filtersets)
--ignore-default-filter Ignore the default filter configured in the profile
Runner options:
--no-run Compile, but don't run benchmarks
--fail-fast Cancel benchmark run on the first failure [aliases: --ff]
--no-fail-fast Run all benchmarks regardless of failure [aliases: --nff]
--max-fail <N> Number of benchmarks that can fail before exiting run [possible values:
integer or "all"]
--no-tests <ACTION> Behavior if there are no benchmarks to run [default: fail] [env:
NEXTEST_NO_TESTS=] [possible values: pass, warn, fail]
--no-capture Run benchmarks serially and do not capture output (always enabled)
Stress testing options:
--stress-count <COUNT> The number of times to run each test, or infinite to run
indefinitely
--stress-duration <DURATION> How long to run stress tests until (e.g. 24h)
--debugger <DEBUGGER> Debug a single test using a text-based or graphical debugger
--tracer <TRACER> Trace a single test using a syscall tracer like strace or truss
Reporter options:
--show-progress <SHOW_PROGRESS> Show nextest progress in the specified manner [env:
NEXTEST_SHOW_PROGRESS=] [possible values: auto, none, bar,
counter, only]
--no-input-handler Disable handling of input keys from the terminal [env:
NEXTEST_NO_INPUT_HANDLER=]
Config options:
--config-file <PATH>
Config file [default: workspace-root/.config/nextest.toml]
--tool-config-file <TOOL:ABS_PATH>
Tool-specific config files
--override-version-check
Override checks for the minimum version defined in nextest's config
-P, --profile <PROFILE>
The nextest profile to use [env: NEXTEST_PROFILE=]
Build and run benchmarks (experimental)
[1m[32mUsage:[0m [1m[36mcargo nextest bench[0m [36m[OPTIONS][0m [36m[FILTERS]...[0m [1m[36m[--[0m [36m<FILTERS_AND_ARGS>...[0m[1m[36m][0m
[1m[32mArguments:[0m
[36m[FILTERS]...[0m Test name filters
[36m[FILTERS_AND_ARGS]...[0m Test name filters and emulated test binary arguments
[1m[32mOptions:[0m
[1m[36m--color[0m[36m [0m[36m<WHEN>[0m Produce color output: auto, always, never [env: CARGO_TERM_COLOR=always]
[default: auto]
[1m[36m--no-pager[0m Do not pipe output through a pager
[1m[36m-v[0m, [1m[36m--verbose[0m Verbose output [env: NEXTEST_VERBOSE=]
[1m[36m-h[0m, [1m[36m--help[0m Print help (see more with '--help')
[1m[32mPackage selection:[0m
[1m[36m-p[0m, [1m[36m--package[0m[36m [0m[36m<PACKAGES>[0m Package to test
[1m[36m--workspace[0m Test all packages in the workspace
[1m[36m--exclude[0m[36m [0m[36m<EXCLUDE>[0m Exclude packages from the test
[1m[36m--all[0m Alias for --workspace (deprecated)
[1m[32mTarget selection:[0m
[1m[36m--lib[0m Test only this package's library unit tests
[1m[36m--bin[0m[36m [0m[36m<BIN>[0m Test only the specified binary
[1m[36m--bins[0m Test all binaries
[1m[36m--example[0m[36m [0m[36m<EXAMPLE>[0m Test only the specified example
[1m[36m--examples[0m Test all examples
[1m[36m--test[0m[36m [0m[36m<TEST>[0m Test only the specified test target
[1m[36m--tests[0m Test all targets
[1m[36m--bench[0m[36m [0m[36m<BENCH>[0m Test only the specified bench target
[1m[36m--benches[0m Test all benches
[1m[36m--all-targets[0m Test all targets
[1m[32mFeature selection:[0m
[1m[36m-F[0m, [1m[36m--features[0m[36m [0m[36m<FEATURES>[0m Space or comma separated list of features to activate
[1m[36m--all-features[0m Activate all available features
[1m[36m--no-default-features[0m Do not activate the [1mdefault[0m feature
[1m[32mCompilation options:[0m
[1m[36m--build-jobs[0m[36m [0m[36m<N>[0m Number of build jobs to run
[1m[36m-r[0m, [1m[36m--release[0m Build artifacts in release mode, with optimizations
[1m[36m--cargo-profile[0m[36m [0m[36m<NAME>[0m Build artifacts with the specified Cargo profile
[1m[36m--target[0m[36m [0m[36m<TRIPLE>[0m Build for the target triple
[1m[36m--target-dir[0m[36m [0m[36m<DIR>[0m Directory for all generated artifacts
[1m[36m--unit-graph[0m Output build graph in JSON (unstable)
[1m[36m--timings[0m[36m[=[0m[36m<FMTS>[0m[36m][0m Timing output formats (unstable) (comma separated): html, json
[1m[32mManifest options:[0m
[1m[36m--manifest-path[0m[36m [0m[36m<PATH>[0m Path to Cargo.toml
[1m[36m--frozen[0m Require Cargo.lock and cache are up to date
[1m[36m--locked[0m Require Cargo.lock is up to date
[1m[36m--offline[0m Run without accessing the network
[1m[32mOther Cargo options:[0m
[1m[36m--cargo-quiet[0m[36m...[0m Do not print cargo log messages (specify twice for no Cargo output
at all)
[1m[36m--cargo-verbose[0m[36m...[0m Use cargo verbose output (specify twice for very verbose/build.rs
output)
[1m[36m--ignore-rust-version[0m Ignore [1mrust-version[0m specification in packages
[1m[36m--future-incompat-report[0m Outputs a future incompatibility report at the end of the build
[1m[36m--config[0m[36m [0m[36m<KEY=VALUE>[0m Override a Cargo configuration value
[1m[36m-Z[0m[36m [0m[36m<FLAG>[0m Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for
details
[1m[32mFilter options:[0m
[1m[36m--run-ignored[0m[36m [0m[36m<WHICH>[0m Run ignored tests [possible values: default, only, all]
[1m[36m--partition[0m[36m [0m[36m<PARTITION>[0m Test partition, e.g. hash:1/2 or count:2/3
[1m[36m-E[0m, [1m[36m--filterset[0m[36m [0m[36m<EXPR>[0m Test filterset (see
[4mhttps://nexte.st/docs/filtersets[0m)
[1m[36m--ignore-default-filter[0m Ignore the default filter configured in the profile
[1m[32mRunner options:[0m
[1m[36m--no-run[0m Compile, but don't run benchmarks
[1m[36m--fail-fast[0m Cancel benchmark run on the first failure [aliases: --ff]
[1m[36m--no-fail-fast[0m Run all benchmarks regardless of failure [aliases: --nff]
[1m[36m--max-fail[0m[36m [0m[36m<N>[0m Number of benchmarks that can fail before exiting run [possible values:
integer or "all"]
[1m[36m--no-tests[0m[36m [0m[36m<ACTION>[0m Behavior if there are no benchmarks to run [default: fail] [env:
NEXTEST_NO_TESTS=] [possible values: pass, warn, fail]
[1m[36m--no-capture[0m Run benchmarks serially and do not capture output (always enabled)
[1m[32mStress testing options:[0m
[1m[36m--stress-count[0m[36m [0m[36m<COUNT>[0m The number of times to run each test, or [1minfinite[0m to run
indefinitely
[1m[36m--stress-duration[0m[36m [0m[36m<DURATION>[0m How long to run stress tests until (e.g. 24h)
[1m[36m--debugger[0m[36m [0m[36m<DEBUGGER>[0m Debug a single test using a text-based or graphical debugger
[1m[36m--tracer[0m[36m [0m[36m<TRACER>[0m Trace a single test using a syscall tracer like [1mstrace[0m or [1mtruss[0m
[1m[32mReporter options:[0m
[1m[36m--show-progress[0m[36m [0m[36m<SHOW_PROGRESS>[0m Show nextest progress in the specified manner [env:
NEXTEST_SHOW_PROGRESS=] [possible values: auto, none, bar,
counter, only]
[1m[36m--no-input-handler[0m Disable handling of input keys from the terminal [env:
NEXTEST_NO_INPUT_HANDLER=]
[1m[32mConfig options:[0m
[1m[36m--config-file[0m[36m [0m[36m<PATH>[0m
Config file [default: workspace-root/.config/nextest.toml]
[1m[36m--tool-config-file[0m[36m [0m[36m<TOOL:ABS_PATH>[0m
Tool-specific config files
[1m[36m--override-version-check[0m
Override checks for the minimum version defined in nextest's config
[1m[36m-P[0m, [1m[36m--profile[0m[36m [0m[36m<PROFILE>[0m
The nextest profile to use [env: NEXTEST_PROFILE=]
The output of cargo nextest bench --help:
Build and run benchmarks (experimental).
This command builds benchmark binaries and queries them for the benchmarks they contain, then runs
each benchmark serially.
This is an experimental feature. To enable it, set the environment variable
NEXTEST_EXPERIMENTAL_BENCHMARKS=1.
Usage: cargo nextest bench [OPTIONS] [FILTERS]... [-- <FILTERS_AND_ARGS>...]
Arguments:
[FILTERS]...
Test name filters
[FILTERS_AND_ARGS]...
Test name filters and emulated test binary arguments.
Supported arguments:
- --ignored: Only run ignored tests
- --include-ignored: Run both ignored and non-ignored tests
- --skip PATTERN: Skip tests that match the pattern
- --exact: Run tests that exactly match patterns after --
Options:
--color <WHEN>
Produce color output: auto, always, never
[env: CARGO_TERM_COLOR=always]
[default: auto]
--no-pager
Do not pipe output through a pager
-v, --verbose
Verbose output
[env: NEXTEST_VERBOSE=]
-h, --help
Print help (see a summary with '-h')
Package selection:
-p, --package <PACKAGES>
Package to test
--workspace
Test all packages in the workspace
--exclude <EXCLUDE>
Exclude packages from the test
--all
Alias for --workspace (deprecated)
Target selection:
--lib
Test only this package's library unit tests
--bin <BIN>
Test only the specified binary
--bins
Test all binaries
--example <EXAMPLE>
Test only the specified example
--examples
Test all examples
--test <TEST>
Test only the specified test target
--tests
Test all targets
--bench <BENCH>
Test only the specified bench target
--benches
Test all benches
--all-targets
Test all targets
Feature selection:
-F, --features <FEATURES>
Space or comma separated list of features to activate
--all-features
Activate all available features
--no-default-features
Do not activate the default feature
Compilation options:
--build-jobs <N>
Number of build jobs to run
-r, --release
Build artifacts in release mode, with optimizations
--cargo-profile <NAME>
Build artifacts with the specified Cargo profile
--target <TRIPLE>
Build for the target triple
--target-dir <DIR>
Directory for all generated artifacts
--unit-graph
Output build graph in JSON (unstable)
--timings[=<FMTS>]
Timing output formats (unstable) (comma separated): html, json
Manifest options:
--manifest-path <PATH>
Path to Cargo.toml
--frozen
Require Cargo.lock and cache are up to date
--locked
Require Cargo.lock is up to date
--offline
Run without accessing the network
Other Cargo options:
--cargo-quiet...
Do not print cargo log messages (specify twice for no Cargo output at all)
--cargo-verbose...
Use cargo verbose output (specify twice for very verbose/build.rs output)
--ignore-rust-version
Ignore rust-version specification in packages
--future-incompat-report
Outputs a future incompatibility report at the end of the build
--config <KEY=VALUE>
Override a Cargo configuration value
-Z <FLAG>
Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
Filter options:
--run-ignored <WHICH>
Run ignored tests
Possible values:
- default: Run non-ignored tests
- only: Run ignored tests
- all: Run both ignored and non-ignored tests
--partition <PARTITION>
Test partition, e.g. hash:1/2 or count:2/3
--platform-filter <PLATFORM>
Filter test binaries by build platform (DEPRECATED).
Instead, use -E with 'platform(host)' or 'platform(target)'.
[default: any]
[possible values: target, host, any]
-E, --filterset <EXPR>
Test filterset (see
https://nexte.st/docs/filtersets)
--ignore-default-filter
Ignore the default filter configured in the profile.
By default, all filtersets are intersected with the default filter configured in the
profile. This flag disables that behavior.
This flag doesn't change the definition of the default() filterset.
Runner options:
--no-run
Compile, but don't run benchmarks
--fail-fast
Cancel benchmark run on the first failure
[aliases: --ff]
--no-fail-fast
Run all benchmarks regardless of failure
[aliases: --nff]
--max-fail <N>
Number of benchmarks that can fail before exiting run [possible values: integer or "all"]
--no-tests <ACTION>
Behavior if there are no benchmarks to run [default: fail]
Possible values:
- pass: Silently exit with code 0
- warn: Produce a warning and exit with code 0
- fail: Produce an error message and exit with code 4
[env: NEXTEST_NO_TESTS=]
--no-capture
Run benchmarks serially and do not capture output (always enabled).
Benchmarks in nextest always run serially, so this flag is kept only for compatibility and
has no effect.
Stress testing options:
--stress-count <COUNT>
The number of times to run each test, or infinite to run indefinitely
--stress-duration <DURATION>
How long to run stress tests until (e.g. 24h)
--debugger <DEBUGGER>
Debug a single test using a text-based or graphical debugger.
Debugger mode automatically:
- disables timeouts
- disables output capture
- passes standard input through to the debugger
Example: --debugger "rust-gdb --args"
--tracer <TRACER>
Trace a single test using a syscall tracer like strace or truss.
Tracer mode automatically:
- disables timeouts
- disables output capture
Unlike --debugger, tracers do not need stdin passthrough or special signal handling.
Example: --tracer "strace -tt"
Reporter options:
--show-progress <SHOW_PROGRESS>
Show nextest progress in the specified manner.
For benchmarks, the default is "counter" which shows the benchmark index (e.g., "(1/10)")
but no progress bar.
This can also be set via user config at ~/.config/nextest/config.toml. See
https://nexte.st/docs/user-config.
Possible values:
- auto: Automatically choose the best progress display based on whether nextest is
running in an interactive terminal
- none: Do not display a progress bar or counter
- bar: Display a progress bar with running tests: default for interactive terminals
- counter: Display a counter next to each completed test
- only: Display a progress bar with running tests, and hide successful test output;
equivalent to --show-progress=running --status-level=slow --final-status-level=none
[env: NEXTEST_SHOW_PROGRESS=]
--no-input-handler
Disable handling of input keys from the terminal.
By default, when running a terminal, nextest accepts the t key to dump test information.
This flag disables that behavior.
[env: NEXTEST_NO_INPUT_HANDLER=]
Config options:
--config-file <PATH>
Config file [default: workspace-root/.config/nextest.toml]
--tool-config-file <TOOL:ABS_PATH>
Tool-specific config files.
Some tools on top of nextest may want to set up their own default configuration but
prioritize user configuration on top. Use this argument to insert configuration that's
lower than --config-file in priority but above the default config shipped with nextest.
Arguments are specified in the format "tool:abs_path", for example
"my-tool:/path/to/nextest.toml" (or "my-tool:C:\path\to\nextest.toml" on Windows). Paths
must be absolute.
This argument may be specified multiple times. Files that come later are lower priority
than those that come earlier.
--override-version-check
Override checks for the minimum version defined in nextest's config.
Repository and tool-specific configuration files can specify minimum required and
recommended versions of nextest. This option overrides those checks.
-P, --profile <PROFILE>
The nextest profile to use.
Nextest's configuration supports multiple profiles, which can be used to set up different
configurations for different purposes. (For example, a configuration for local runs and
one for CI.) This option selects the profile to use.
[env: NEXTEST_PROFILE=]
Build and run benchmarks (experimental).[0m
[0m
This command builds benchmark binaries and queries them for the benchmarks they contain, then runs
each benchmark [1mserially[0m.[0m
[0m
This is an experimental feature. To enable it, set the environment variable [1m
NEXTEST_EXPERIMENTAL_BENCHMARKS=1[0m.[0m
[1m[32mUsage:[0m [1m[36mcargo nextest bench[0m [36m[OPTIONS][0m [36m[FILTERS]...[0m [1m[36m[--[0m [36m<FILTERS_AND_ARGS>...[0m[1m[36m][0m
[1m[32mArguments:[0m
[36m[FILTERS]...[0m
Test name filters
[36m[FILTERS_AND_ARGS]...[0m
Test name filters and emulated test binary arguments.[0m
[0m
Supported arguments:[0m
[0m
- --ignored: Only run ignored tests[0m
- --include-ignored: Run both ignored and non-ignored tests[0m
- --skip PATTERN: Skip tests that match the pattern[0m
- --exact: Run tests that exactly match patterns after [1m--[0m[0m
[1m[32mOptions:[0m
[1m[36m--color[0m[36m [0m[36m<WHEN>[0m
Produce color output: auto, always, never
[env: CARGO_TERM_COLOR=always]
[default: auto]
[1m[36m--no-pager[0m
Do not pipe output through a pager
[1m[36m-v[0m, [1m[36m--verbose[0m
Verbose output
[env: NEXTEST_VERBOSE=]
[1m[36m-h[0m, [1m[36m--help[0m
Print help (see a summary with '-h')
[1m[32mPackage selection:[0m
[1m[36m-p[0m, [1m[36m--package[0m[36m [0m[36m<PACKAGES>[0m
Package to test
[1m[36m--workspace[0m
Test all packages in the workspace
[1m[36m--exclude[0m[36m [0m[36m<EXCLUDE>[0m
Exclude packages from the test
[1m[36m--all[0m
Alias for --workspace (deprecated)
[1m[32mTarget selection:[0m
[1m[36m--lib[0m
Test only this package's library unit tests
[1m[36m--bin[0m[36m [0m[36m<BIN>[0m
Test only the specified binary
[1m[36m--bins[0m
Test all binaries
[1m[36m--example[0m[36m [0m[36m<EXAMPLE>[0m
Test only the specified example
[1m[36m--examples[0m
Test all examples
[1m[36m--test[0m[36m [0m[36m<TEST>[0m
Test only the specified test target
[1m[36m--tests[0m
Test all targets
[1m[36m--bench[0m[36m [0m[36m<BENCH>[0m
Test only the specified bench target
[1m[36m--benches[0m
Test all benches
[1m[36m--all-targets[0m
Test all targets
[1m[32mFeature selection:[0m
[1m[36m-F[0m, [1m[36m--features[0m[36m [0m[36m<FEATURES>[0m
Space or comma separated list of features to activate
[1m[36m--all-features[0m
Activate all available features
[1m[36m--no-default-features[0m
Do not activate the [1mdefault[0m feature
[1m[32mCompilation options:[0m
[1m[36m--build-jobs[0m[36m [0m[36m<N>[0m
Number of build jobs to run
[1m[36m-r[0m, [1m[36m--release[0m
Build artifacts in release mode, with optimizations
[1m[36m--cargo-profile[0m[36m [0m[36m<NAME>[0m
Build artifacts with the specified Cargo profile
[1m[36m--target[0m[36m [0m[36m<TRIPLE>[0m
Build for the target triple
[1m[36m--target-dir[0m[36m [0m[36m<DIR>[0m
Directory for all generated artifacts
[1m[36m--unit-graph[0m
Output build graph in JSON (unstable)
[1m[36m--timings[0m[36m[=[0m[36m<FMTS>[0m[36m][0m
Timing output formats (unstable) (comma separated): html, json
[1m[32mManifest options:[0m
[1m[36m--manifest-path[0m[36m [0m[36m<PATH>[0m
Path to Cargo.toml
[1m[36m--frozen[0m
Require Cargo.lock and cache are up to date
[1m[36m--locked[0m
Require Cargo.lock is up to date
[1m[36m--offline[0m
Run without accessing the network
[1m[32mOther Cargo options:[0m
[1m[36m--cargo-quiet[0m[36m...[0m
Do not print cargo log messages (specify twice for no Cargo output at all)
[1m[36m--cargo-verbose[0m[36m...[0m
Use cargo verbose output (specify twice for very verbose/build.rs output)
[1m[36m--ignore-rust-version[0m
Ignore [1mrust-version[0m specification in packages
[1m[36m--future-incompat-report[0m
Outputs a future incompatibility report at the end of the build
[1m[36m--config[0m[36m [0m[36m<KEY=VALUE>[0m
Override a Cargo configuration value
[1m[36m-Z[0m[36m [0m[36m<FLAG>[0m
Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
[1m[32mFilter options:[0m
[1m[36m--run-ignored[0m[36m [0m[36m<WHICH>[0m
Run ignored tests
Possible values:
- [1m[36mdefault[0m: Run non-ignored tests
- [1m[36monly[0m: Run ignored tests
- [1m[36mall[0m: Run both ignored and non-ignored tests
[1m[36m--partition[0m[36m [0m[36m<PARTITION>[0m
Test partition, e.g. hash:1/2 or count:2/3
[1m[36m--platform-filter[0m[36m [0m[36m<PLATFORM>[0m
Filter test binaries by build platform (DEPRECATED).[0m
[0m
Instead, use -E with 'platform(host)' or 'platform(target)'.[0m
[default: any]
[possible values: target, host, any]
[1m[36m-E[0m, [1m[36m--filterset[0m[36m [0m[36m<EXPR>[0m
Test filterset (see
[4mhttps://nexte.st/docs/filtersets[0m)
[1m[36m--ignore-default-filter[0m
Ignore the default filter configured in the profile.[0m
[0m
By default, all filtersets are intersected with the default filter configured in the
profile. This flag disables that behavior.[0m
[0m
This flag doesn't change the definition of the [1mdefault()[0m filterset.[0m
[1m[32mRunner options:[0m
[1m[36m--no-run[0m
Compile, but don't run benchmarks
[1m[36m--fail-fast[0m
Cancel benchmark run on the first failure
[aliases: --ff]
[1m[36m--no-fail-fast[0m
Run all benchmarks regardless of failure
[aliases: --nff]
[1m[36m--max-fail[0m[36m [0m[36m<N>[0m
Number of benchmarks that can fail before exiting run [possible values: integer or "all"]
[1m[36m--no-tests[0m[36m [0m[36m<ACTION>[0m
Behavior if there are no benchmarks to run [default: fail]
Possible values:
- [1m[36mpass[0m: Silently exit with code 0
- [1m[36mwarn[0m: Produce a warning and exit with code 0
- [1m[36mfail[0m: Produce an error message and exit with code 4
[env: NEXTEST_NO_TESTS=]
[1m[36m--no-capture[0m
Run benchmarks serially and do not capture output (always enabled).[0m
[0m
Benchmarks in nextest always run serially, so this flag is kept only for compatibility and
has no effect.[0m
[1m[32mStress testing options:[0m
[1m[36m--stress-count[0m[36m [0m[36m<COUNT>[0m
The number of times to run each test, or [1minfinite[0m to run indefinitely
[1m[36m--stress-duration[0m[36m [0m[36m<DURATION>[0m
How long to run stress tests until (e.g. 24h)
[1m[36m--debugger[0m[36m [0m[36m<DEBUGGER>[0m
Debug a single test using a text-based or graphical debugger.[0m
[0m
Debugger mode automatically:[0m
[0m
- disables timeouts[0m
- disables output capture[0m
- passes standard input through to the debugger[0m
[0m
Example: [1m--debugger "rust-gdb --args"[0m[0m
[1m[36m--tracer[0m[36m [0m[36m<TRACER>[0m
Trace a single test using a syscall tracer like [1mstrace[0m or [1mtruss[0m.[0m
[0m
Tracer mode automatically:[0m
[0m
- disables timeouts[0m
- disables output capture[0m
[0m
Unlike [1m--debugger[0m, tracers do not need stdin passthrough or special signal handling.[0m
[0m
Example: [1m--tracer "strace -tt"[0m[0m
[1m[32mReporter options:[0m
[1m[36m--show-progress[0m[36m [0m[36m<SHOW_PROGRESS>[0m
Show nextest progress in the specified manner.[0m
[0m
For benchmarks, the default is "counter" which shows the benchmark index (e.g., "(1/10)")
but no progress bar.[0m
[0m
This can also be set via user config at [1m~/.config/nextest/config.toml[0m. See [4m
https://nexte.st/docs/user-config[0m.[0m
Possible values:
- [1m[36mauto[0m: Automatically choose the best progress display based on whether nextest is
running in an interactive terminal
- [1m[36mnone[0m: Do not display a progress bar or counter
- [1m[36mbar[0m: Display a progress bar with running tests: default for interactive terminals
- [1m[36mcounter[0m: Display a counter next to each completed test
- [1m[36monly[0m: Display a progress bar with running tests, and hide successful test output;
equivalent to [1m--show-progress=running --status-level=slow --final-status-level=none[0m
[env: NEXTEST_SHOW_PROGRESS=]
[1m[36m--no-input-handler[0m
Disable handling of input keys from the terminal.[0m
[0m
By default, when running a terminal, nextest accepts the [1mt[0m key to dump test information.
This flag disables that behavior.[0m
[env: NEXTEST_NO_INPUT_HANDLER=]
[1m[32mConfig options:[0m
[1m[36m--config-file[0m[36m [0m[36m<PATH>[0m
Config file [default: workspace-root/.config/nextest.toml]
[1m[36m--tool-config-file[0m[36m [0m[36m<TOOL:ABS_PATH>[0m
Tool-specific config files.[0m
[0m
Some tools on top of nextest may want to set up their own default configuration but
prioritize user configuration on top. Use this argument to insert configuration that's
lower than --config-file in priority but above the default config shipped with nextest.[0m
[0m
Arguments are specified in the format "tool:abs_path", for example
"my-tool:/path/to/nextest.toml" (or "my-tool:C:\path\to\nextest.toml" on Windows). Paths
must be absolute.[0m
[0m
This argument may be specified multiple times. Files that come later are lower priority
than those that come earlier.[0m
[1m[36m--override-version-check[0m
Override checks for the minimum version defined in nextest's config.[0m
[0m
Repository and tool-specific configuration files can specify minimum required and
recommended versions of nextest. This option overrides those checks.[0m
[1m[36m-P[0m, [1m[36m--profile[0m[36m [0m[36m<PROFILE>[0m
The nextest profile to use.[0m
[0m
Nextest's configuration supports multiple profiles, which can be used to set up different
configurations for different purposes. (For example, a configuration for local runs and
one for CI.) This option selects the profile to use.[0m
[env: NEXTEST_PROFILE=]