ワンクリックで
benchmark
Run Go benchmarks and compare results to detect performance regressions. Use before and after performance-related changes.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Run Go benchmarks and compare results to detect performance regressions. Use before and after performance-related changes.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Run pre-push quality checks (vet + lint + tests with race detector). Use before pushing code.
Run tests with coverage analysis and identify untested code paths. Use to find gaps before releases.
Check and tidy Go module dependencies. Use after adding/removing imports or before releases.
Run go generate to build templ templates and frontend assets. Use after changing templates or CSS/JS.
Run integration tests that require Docker (Postgres, MinIO via testcontainers). Use to validate database and storage behavior.
Run golangci-lint and static analysis on Go code. Use before pushing or to check code quality.
| name | benchmark |
| description | Run Go benchmarks and compare results to detect performance regressions. Use before and after performance-related changes. |
| disable-model-invocation | true |
| argument-hint | package-path |
Run Go benchmarks to measure and compare performance. Flags regressions exceeding 10%.
/benchmark - Run benchmarks on all packages/benchmark ./internal/index/... - Run benchmarks on specific package/benchmark -compare ./... - Compare against saved baselineIdentify benchmark targets
$ARGUMENTS specifies a package, use that*_test.go files containing Benchmark functionsinternal/index/, internal/repo/, internal/api/Run benchmarks
go test -bench=. -benchmem -count=5 $ARGUMENTS 2>&1
-count=5 for statistical reliability-benchmem to track allocationsParse and analyze results For each benchmark, extract:
ns/op - Nanoseconds per operationB/op - Bytes allocated per operationallocs/op - Allocations per operationCheck for baseline comparison
.benchmark-baseline file in project root-compare flag used and baseline exists, compare resultsReport findings Format results as a table:
| Benchmark | ns/op | B/op | allocs/op | Change |
|-----------|-------|------|-----------|--------|
Flag any metric that regressed more than 10% with a warning.
Offer to save baseline If no baseline exists or results improved, offer to save current results:
go test -bench=. -benchmem -count=5 ./... > .benchmark-baseline
Pay special attention to:
internal/index/ - Trigram search (hot path)internal/repo/ - Repository access patternsinternal/api/search/ - Search request handlinginternal/storage/ - S3 result compressionBenchmark Results for ./internal/index/...
| Benchmark | ns/op | B/op | allocs/op |
|---------------------|----------|-------|-----------|
| BenchmarkSearch-8 | 1234567 | 4096 | 12 |
| BenchmarkOpen-8 | 567890 | 8192 | 24 |
No regressions detected (threshold: 10%)