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

stacy bench

Benchmark script execution

Synopsis

stacy bench <SCRIPT> [OPTIONS]

Description

Runs a Stata script multiple times and reports timing statistics (mean, median, min, max, stddev). Includes warmup runs by default to account for JIT and caching effects.

Arguments

ArgumentDescription
<SCRIPT>Stata script to benchmark (required)

Options

OptionDescription
--no_warmupSkip warmup runs
-q, --quietSuppress progress output
-n, --runsNumber of measured runs
-w, --warmupNumber of warmup runs

Examples

Benchmark a script

stacy bench analysis.do

Custom run count

stacy bench -n 20 analysis.do

Exit Codes

CodeMeaning
0Success
1Script failed during benchmark
3Script not found

See Exit Codes Reference for details.

See Also