Invocation, options and results
링크topaz bench
topaz bench [entry]
입력
Accept zero or one entry operand and the listed compiler, lock, verbosity, root, language, resource, and format options. Select the package entry when the operand is absent.
Accept - and -, with human output by default. Reject -, invalid formats, program arguments, and unrelated build or execution options.
옵션과 충돌
| 옵션 | 기본값 | 계약 | 충돌 |
|---|---|---|---|
--compiler rust|self | self | compiler selector (default self); rust selects the reference compiler Also rejects combination with --producer, --self-source. | 없음 |
--locked | false | Verify topaz.lock before compiling the selected package. | 없음 |
--format human|json | human | Selects human output or one JSON report. The default is human output. | 없음 |
--verbose | false | Reports the selected compiler and whether it was explicit or the default. For | 없음 |
--root <dir> | entry directory; . in package mode | The explicit source root or package root for this invocation. | 없음 |
--language-version <5.21> | 5.21 | language version selector | 없음 |
--compiler-memory-mib <MiB> | 8192 | self compiler worker memory budget (8192); overrides TOPAZ_COMPILER_MEMORY_MIB A positive integer is required. Environment input: TOPAZ_COMPILER_MEMORY_MIB. | 없음 |
--compiler-time-ms <ms> | 1800000 | self compilation wall-clock budget (1800000); overrides TOPAZ_COMPILER_TIME_MS A positive integer is required. Environment input: TOPAZ_COMPILER_TIME_MS. | 없음 |
출력 채널
stdout
stderr
종료 상태
0
Checking succeeds and the benchmark report is produced.
1
Arguments, loading, checking, compiler execution, or report generation fails.
효과
Read the selected source graph and existing dependencies. Do not execute the program, write build artifacts, or change project inputs. Compiler-owned temporary workspace files may be used.
The command performs no network access and does not fetch dependencies.
Fixed compiler, source, dependency, and option inputs produce the same check verdict and module count. elapsed measures the current execution and can vary. Path spelling and host conditions remain inputs to the report.
Package loading and - verification follow check. Missing registry content or an invalid lock fails before measurement completes and never starts a vendor operation.
Registry dependencies or Lispex configuration require explicit -, even when a matching lock exists. Without that option, a local-only package can load declared path dependencies by their expected hashes. Locked loading rejects missing or stale state and never repairs it.
Standalone entry mode rejects -. Selected-entry test is the exception when an explicit root contains the package manifest and the entry belongs to that package.
Operation
링크Benchmark results describe the compiler pipeline for the supplied inputs. The selected program is not executed.
Option conditions
링크Use - for the JSON report. The - spelling is rejected.
--locked applies to package-mode check, run, emit, build, test, doc, bench, compiler observe, compiler preview. Selected-entry test also accepts it when --root contains topaz.toml.
- cannot be combined with bootstrap - or -
Behavior contract
링크Command behavior
Arguments and rejection
Accept zero or one entry operand and the listed compiler, lock, verbosity, root, language, resource, and format options. Select the package entry when the operand is absent.
Accept - and -, with human output by default. Reject -, invalid formats, program arguments, and unrelated build or execution options.
Output
Human output identifies the entry, bench check-, the module count, and elapsed milliseconds. JSON output is one object on standard output with status equal to check-, string entry, integer modules, and numeric elapsed.
Module counts and elapsed milliseconds are nonnegative. Diagnostics and command failures use standard error. Failure does not emit a successful benchmark report.
Exit status
Exit 0 means checking completed and the timing report was written. Exit 1 covers invalid arguments, package or lock loading, source diagnostics, compiler failure, exhausted resources, and report failure.
Filesystem effects
Read the selected source graph and existing dependencies. Do not execute the program, write build artifacts, or change project inputs. Compiler-owned temporary workspace files may be used.
Network access
The command performs no network access and does not fetch dependencies.
Reproducibility
Fixed compiler, source, dependency, and option inputs produce the same check verdict and module count. elapsed measures the current execution and can vary. Path spelling and host conditions remain inputs to the report.
Packages and locks
Package loading and - verification follow check. Missing registry content or an invalid lock fails before measurement completes and never starts a vendor operation.
Registry dependencies or Lispex configuration require explicit -, even when a matching lock exists. Without that option, a local-only package can load declared path dependencies by their expected hashes. Locked loading rejects missing or stale state and never repairs it.
Standalone entry mode rejects -. Selected-entry test is the exception when an explicit root contains the package manifest and the entry belongs to that package.
이유
Benchmarking requests a measurement of compiler work, not program execution. Timing must remain variable so a repeatability promise does not turn a measurement into an invented constant.
The pinned public release recipe checks legacy argument rejection. It does not verify the adopted JSON-success contract. The separate published JSON test retains that expectation and its named implementation limitation.
The allowed vector selects JSON, but the preserved public 5.21.3 recipe records its legacy rejection. The adopted JSON-success expectation remains in the existing published test and its precise limitation. No observation replaces that expectation.
Example contract
링크Example contract
The invocation topaz bench main. is expected to exit with 0.
The benchmark checks the fixture without running it and writes a JSON report. Timing values vary between executions.
이유
Benchmarking produces timing measurements. The common format selector exposes those measurements as structured data without executing the program.
Example
링크Benchmark JSON with --format json
링크function identity<T>(value: T) -> T {value}
기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.
표준 출력은 JSON 객체입니다. 전체 스키마는 미정입니다.
The benchmark checks the fixture without running it and writes a JSON report. Timing values vary between executions.
Verification scope
링크Observed with Topaz 5.21.3 on 2026-11-06T08:36:29.642Z. This invocation passed; exit 1. 3 assertions were evaluated against the independent expected result. Execution record. This result covers the displayed invocation.