---
source: crates/perfgate-cli/tests/cli_help_snapshot_tests.rs
assertion_line: 239
expression: "help_output(&[\"compare\", \"--help\"])"
---
Compare a current receipt against a baseline and emit a compare receipt (JSON)
Usage: perfgate compare [OPTIONS] --baseline <BASELINE> --current <CURRENT>
Options:
--baseline <BASELINE> Path to baseline receipt, or "@server:benchmark_name" to fetch from server
--baseline-project <BASELINE_PROJECT> Project name for server baseline lookup (overrides global --project)
--current <CURRENT>
--threshold <THRESHOLD> Global regression threshold (0.20 = 20%) [default: 0.2]
--warn-factor <WARN_FACTOR> Global warn factor (warn_threshold = threshold * warn_factor) [default: 0.9]
--noise-threshold <NOISE_THRESHOLD> Global noise threshold (coefficient of variation). If CV exceeds this, the metric is considered flaky/noisy
--noise-policy <NOISE_POLICY> Global noise policy (warn|skip|ignore)
--metric-threshold <METRIC_THRESHOLD> Override per-metric threshold, e.g. wall_ms=0.10
--metric-noise-threshold <METRIC_NOISE_THRESHOLD> Override per-metric noise threshold, e.g. wall_ms=0.05
--direction <DIRECTION> Override per-metric direction, e.g. throughput_per_s=higher
--metric-stat <METRIC_STAT> Override per-metric statistic, e.g. wall_ms=p95
--significance-alpha <SIGNIFICANCE_ALPHA> Compute per-metric significance metadata using Welch's t-test (p <= alpha)
--significance-min-samples <SIGNIFICANCE_MIN_SAMPLES> Minimum samples required in each run before significance is computed [default: 8]
--require-significance When set with --significance-alpha, warn/fail statuses require significance
--fail-on-warn Treat WARN verdict as a failing exit code
--host-mismatch <HOST_MISMATCH> Policy for handling host mismatches between baseline and current runs [default: warn]
--out <OUT> Output compare receipt [default: perfgate-compare.json]
--pretty Pretty-print JSON
--profile-on-regression Automatically capture a flamegraph when a regression is detected (warn or fail). Requires a profiler: perf (Linux), dtrace (macOS), or cargo-flamegraph
-h, --help Print help
Global Options:
--baseline-server <BASELINE_SERVER> URL of the baseline server (e.g., http://localhost:3000/api/v1) Can also be set via PERFGATE_SERVER_URL environment variable
--api-key <API_KEY> API key for authentication with the baseline server. Can also be set via PERFGATE_API_KEY environment variable
--project <PROJECT> Project name for multi-tenancy. Can also be set via PERFGATE_PROJECT environment variable