[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76H4Z2D4W0NP44BV8EKDWXT":3,"skill-same:01M76H4Z2D4W0NP44BV8EKDWXT":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":51,"updatedAt":52,"install":53,"resources":65},"01M76H4Z2D4W0NP44BV8EKDWXT","golang-benchmark",null,"Golang benchmarking, profiling, and performance measurement. Use when writing, running, or comparing Go benchmarks, profiling hot paths with pprof, interpreting CPU\u002Fmemory\u002Ftrace profiles, analyzing results with benchstat, setting up CI benchmark regression detection, or investigating production performance with Prometheus runtime metrics. Also use when the developer needs deep analysis on a specific performance indicator - this skill provides the measurement methodology, while `samber\u002Fcc-skills-golang@golang-performance` provides the optimization patterns.","bg-szy\u002FTOP-SKILLS","bg-szy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F106576190?v=4","01M73A4E8KPV67SFXRY8XZGNBX","ShuZhiyong","01M73A4E96MQ294MHM74TZBVQD",6,"MIT","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fgolang-benchmark\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: golang-benchmark\ndescription: \"Golang benchmarking, profiling, and performance measurement. Use when writing, running, or comparing Go benchmarks, profiling hot paths with pprof, interpreting CPU\u002Fmemory\u002Ftrace profiles, analyzing results with benchstat, setting up CI benchmark regression detection, or investigating production performance with Prometheus runtime metrics. Also use when the developer needs deep analysis on a specific performance indicator - this skill provides the measurement methodology, while `samber\u002Fcc-skills-golang@golang-performance` provides the optimization patterns.\"\nuser-invocable: true\nlicense: MIT\ncompatibility: Designed for Claude Code, Codex or similar harness, and for projects using Golang.\nmetadata:\n  author: samber\n  version: \"1.3.2\"\n  openclaw:\n    emoji: \"📊\"\n    homepage: https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang\n    requires:\n      bins:\n        - go\n        - benchstat\n    install:\n      - kind: go\n        package: golang.org\u002Fx\u002Fperf\u002Fcmd\u002Fbenchstat@latest\n        bins: [benchstat]\nallowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent WebFetch Bash(benchstat:*) Bash(benchdiff:*) Bash(cob:*) Bash(gobenchdata:*) Bash(curl:*) mcp__context7__resolve-library-id mcp__context7__query-docs WebSearch AskUserQuestion EnterWorktree ExitWorktree\npaths:\n  - \"**\u002F*.go\"\n---\n\n**Persona:** You are a Go performance measurement engineer. You never draw conclusions from a single benchmark run — statistical rigor and controlled conditions are prerequisites before any optimization decision.\n\n**Thinking mode:** Reason as thoroughly as possible for benchmark analysis, profile interpretation, and performance comparison tasks — deep reasoning prevents misinterpreting profiling data and ensures statistically sound conclusions. On Claude Code, use `ultrathink` to trigger extended thinking explicitly.\n\n**Dependencies:**\n\n- benchstat: `go install golang.org\u002Fx\u002Fperf\u002Fcmd\u002Fbenchstat@latest`\n\n# Go Benchmarking & Performance Measurement\n\nPerformance improvement does not exist without measures — if you can measure it, you can improve it.\n\nThis skill covers the full measurement workflow: write a benchmark, run it, profile the result, compare before\u002Fafter with statistical rigor, and track regressions in CI. For optimization patterns to apply after measurement, → See `samber\u002Fcc-skills-golang@golang-performance` skill. For pprof setup on running services, → See `samber\u002Fcc-skills-golang@golang-troubleshooting` skill.\n\n## Writing Benchmarks\n\n### File and Ordering Conventions\n\nBenchmark functions live in a `_bench_test.go` file named after the source file under benchmark, not after the individual function — `parser.go` -> `parser_bench_test.go`, containing `BenchmarkParse`, `BenchmarkEncode`, etc., not a separate `benchmarkparse_test.go` per function.\n\n- Keeping benchmarks in their own file (instead of mixed into `parser_test.go`) keeps `go test -bench=. .\u002Fpkg\u002Fparser` output free of unrelated `Test*` noise.\n- It separates fixtures sized for measurement (large inputs, long-lived setup) from those sized for correctness — the two rarely share the same shape.\n- The file still follows Go's one-test-file-per-source-file convention (→ See `samber\u002Fcc-skills-golang@golang-testing` skill), just with the `_bench` suffix marking its narrower purpose.\n\nOrder `Benchmark*` functions inside `parser_bench_test.go` to mirror the order of the functions\u002Fmethods they measure in `parser.go` — a reader comparing the two files top to bottom should find `BenchmarkParse` at the same relative position as `Parse`.\n\n### `b.Loop()` (Go 1.24+) — preferred\n\nFor Go 1.24+, prefer `b.Loop()` for new benchmarks. It times only the loop body and keeps function arguments\u002Fresults alive, which reduces dead-code-elimination mistakes.\n\n```go\nfunc BenchmarkParse(b *testing.B) {\n    data := loadFixture(\"large.json\") \u002F\u002F setup — excluded from timing\n    for b.Loop() {\n        Parse(data)  \u002F\u002F compiler cannot eliminate this call\n    }\n}\n```\n\nLegacy `b.N` loops still compile and are fine to keep when preserving existing benchmarks or supporting Go \u003C1.24. They are easier to get wrong: setup may need `b.ResetTimer()`, and results may need a sink if the compiler can eliminate the work. Go 1.26 fixed an earlier `b.Loop()` inlining limitation — benchmarks on 1.24–1.25 already benefit from `b.Loop()` but may miss inlining optimizations that 1.26 delivers.\n\nGo 1.27's size-specialized allocator changes allocation-heavy benchmark baselines (faster sub-80-byte allocations, larger binaries) independent of any code change. Treat a `benchstat` comparison that straddles the Go 1.26→1.27 toolchain boundary as measuring the toolchain, not the code — rerun the \"before\" benchmark on the same toolchain as \"after\" before trusting the delta.\n\n### Memory tracking\n\n```go\nfunc BenchmarkAlloc(b *testing.B) {\n    b.ReportAllocs() \u002F\u002F or run with -benchmem flag\n    var sink []byte\n    for b.Loop() {\n        sink = make([]byte, 1024)\n    }\n    _ = sink\n}\n```\n\n`b.ReportMetric()` adds custom metrics (e.g., throughput):\n\n```go\nb.ReportMetric(float64(totalBytes)\u002Fb.Elapsed().Seconds(), \"bytes\u002Fs\") \u002F\u002F b.Elapsed() is only valid inside b.Loop()\n```\n\n### Sub-benchmarks and table-driven\n\n```go\nfunc BenchmarkEncode(b *testing.B) {\n    for _, size := range []int{64, 256, 4096} {\n        b.Run(fmt.Sprintf(\"size=%d\", size), func(b *testing.B) {\n            data := make([]byte, size)\n            for b.Loop() {\n                Encode(data)\n            }\n        })\n    }\n}\n```\n\n## Running Benchmarks\n\n```bash\ngo test -bench=BenchmarkEncode -benchmem -count=10 .\u002Fpkg\u002F... | tee bench.txt\n```\n\n| Flag                   | Purpose                                   |\n| ---------------------- | ----------------------------------------- |\n| `-bench=.`             | Run all benchmarks (regexp filter)        |\n| `-benchmem`            | Report allocations (B\u002Fop, allocs\u002Fop)      |\n| `-count=10`            | Run 10 times for statistical significance |\n| `-benchtime=3s`        | Minimum time per benchmark (default 1s)   |\n| `-cpu=1,2,4`           | Run with different GOMAXPROCS values      |\n| `-cpuprofile=cpu.prof` | Write CPU profile                         |\n| `-memprofile=mem.prof` | Write memory profile                      |\n| `-trace=trace.out`     | Write execution trace                     |\n\n**Output format:** `BenchmarkEncode\u002Fsize=64-8  5000000  230.5 ns\u002Fop  128 B\u002Fop  2 allocs\u002Fop` — the `-8` suffix is GOMAXPROCS, `ns\u002Fop` is time per operation, `B\u002Fop` is bytes allocated per op, `allocs\u002Fop` is heap allocation count per op.\n\n## Comparing Optimization Variants in Parallel\n\nWhen several competing optimization hypotheses exist for the same bottleneck, implement each variant in its own isolated worktree via a separate sub-agent, so their code changes never collide in the shared working tree.\n\n**Run the benchmarks serially, not concurrently.** Concurrent benchmark runs share the same CPU — the noisy-neighbor effect contaminates `ns\u002Fop` and reintroduces the exact statistical noise `-count` and `benchstat` exist to eliminate. Implementing in parallel is safe (isolated worktrees, no file contention); measuring in parallel is not (shared hardware, real contention). Run each variant's benchmark one at a time, back in the main tree or sequentially per worktree.\n\nCompare every variant's `benchstat` output against the **same** baseline report, keep the winner, and remove the worktrees for the rest.\n\n## Documenting Results in Commits\n\nPaste benchstat output in the commit body when the change has a measurable performance impact. This documents _why_ an optimization was made, prevents future readers from reverting it, and lets reviewers verify the claim without re-running benchmarks.\n\nCommit format:\n\n```\nperf(parser): reduce Parse allocations 50% with sync.Pool\n\nReplace per-call []byte allocation with a pooled buffer.\n\ngoos: linux \u002F goarch: amd64 \u002F cpu: AMD Ryzen 9 5950X\n          │    old     │              new               │\n          │  sec\u002Fop    │  sec\u002Fop     vs base            │\nParse-32    4.592µ ± 2%  3.041µ ± 1%  -33.78% (p=0.000 n=10)\n\n          │   old    │             new              │\n          │   B\u002Fop   │   B\u002Fop     vs base           │\nParse-32   1.024Ki ± 0%  0.512Ki ± 0%  -50.00% (p=0.000 n=10)\n\n          │ old  │            new             │\n          │ allocs\u002Fop │ allocs\u002Fop  vs base    │\nParse-32   12.00 ± 0%   6.000 ± 0%  -50.00% (p=0.000 n=10)\n```\n\n**Rules:**\n\n- Only include benchmarks directly affected by the change — strip unrelated rows\n- Never paste results with `~` (no statistical significance) — the improvement cannot be claimed\n- Include the hardware context line (`goos\u002Fgoarch\u002Fcpu`) so results are reproducible\n- Use `perf(scope):` commit type for performance-only changes\n\n## Profiling from Benchmarks\n\nGenerate profiles directly from benchmark runs — no HTTP server needed:\n\n```bash\n# CPU profile\ngo test -bench=BenchmarkParse -cpuprofile=cpu.prof .\u002Fpkg\u002Fparser\ngo tool pprof cpu.prof\n\n# Memory profile (alloc_objects shows GC churn, inuse_space shows leaks)\ngo test -bench=BenchmarkParse -memprofile=mem.prof .\u002Fpkg\u002Fparser\ngo tool pprof -alloc_objects mem.prof\n\n# Execution trace\ngo test -bench=BenchmarkParse -trace=trace.out .\u002Fpkg\u002Fparser\ngo tool trace trace.out\n```\n\nFor full pprof CLI reference (all commands, non-interactive mode, profile interpretation), see [pprof Reference](.\u002Freferences\u002Fpprof.md). For execution trace interpretation, see [Trace Reference](.\u002Freferences\u002Ftrace.md). For statistical comparison, see [benchstat Reference](.\u002Freferences\u002Fbenchstat.md).\n\n## Reference Files\n\n- **[pprof Reference](.\u002Freferences\u002Fpprof.md)** — Interactive and non-interactive analysis of CPU, memory, and goroutine profiles. Full CLI commands, profile types (CPU vs alloc*objects vs inuse_space), web UI navigation, and interpretation patterns. Use this to dive deep into \\_where* time and memory are being spent in your code.\n\n- **[benchstat Reference](.\u002Freferences\u002Fbenchstat.md)** — Statistical comparison of benchmark runs with rigorous confidence intervals and p-value tests. Covers output reading, filtering old benchmarks, interleaving results for visual clarity, and regression detection. Use this when you need to prove a change made a meaningful performance difference, not just a lucky run.\n\n- **[Trace Reference](.\u002Freferences\u002Ftrace.md)** — Execution tracer for understanding _when_ and _why_ code runs. Visualizes goroutine scheduling, garbage collection phases, network blocking, and custom span annotations. Use this when pprof (which shows _where_ CPU goes) isn't enough — you need to see the timeline of what happened.\n\n- **[Diagnostic Tools](.\u002Freferences\u002Ftools.md)** — Quick reference for ancillary tools: fieldalignment (struct padding waste), GODEBUG (runtime logging flags), fgprof (frame graph profiles), race detector (concurrency bugs), and others. Use this when you have a specific symptom and need a focused diagnostic — don't reach for pprof if a simpler tool already answers your question.\n\n- **[Compiler Analysis](.\u002Freferences\u002Fcompiler-analysis.md)** — Low-level compiler optimization insights: escape analysis (when values move to the heap), inlining decisions (which function calls are eliminated), SSA dump (intermediate representation), and assembly output. Use this when benchmarks show allocations you didn't expect, or when you want to verify the compiler did what you intended.\n\n- **[CI Regression Detection](.\u002Freferences\u002Fci-regression.md)** — Automated performance regression gating in CI pipelines. Covers three tools (benchdiff for quick PR comparisons, cob for strict threshold-based gating, gobenchdata for long-term trend dashboards), noisy neighbor mitigation strategies (why cloud CI benchmarks vary 5-10% even on quiet machines), and self-hosted runner tuning to make benchmarks reproducible. Use this when you want to ensure pull requests don't silently slow down your codebase — detecting regressions early prevents shipping performance debt.\n\n- **[Investigation Session](.\u002Freferences\u002Finvestigation-session.md)** — Production performance troubleshooting workflow combining Prometheus runtime metrics (heap size, GC frequency, goroutine counts), PromQL queries to correlate metrics with code changes, runtime configuration flags (GODEBUG env vars to enable GC logging), and cost warnings (when you're hitting performance tax). Use this when production benchmarks look good but real traffic behaves differently.\n\n- **[Prometheus Go Metrics Reference](.\u002Freferences\u002Fprometheus-go-metrics.md)** — Complete listing of Go runtime metrics actually exposed as Prometheus metrics by `prometheus\u002Fclient_golang`. Covers 30 default metrics, 40+ optional metrics (Go 1.17+), process metrics, and common PromQL queries. Distinguishes between `runtime\u002Fmetrics` (Go internal data) and Prometheus metrics (what you scrape from `\u002Fmetrics`). Use this when setting up monitoring dashboards or writing PromQL queries for production alerts.\n\n## Cross-References\n\n- → See `samber\u002Fcc-skills-golang@golang-performance` skill for optimization patterns to apply after measuring (\"if X bottleneck, apply Y\")\n- → See `samber\u002Fcc-skills-golang@golang-troubleshooting` skill for pprof setup on running services (enable, secure, capture), Delve debugger, GODEBUG flags, root cause methodology\n- → See `samber\u002Fcc-skills-golang@golang-observability` skill for everyday always-on monitoring, continuous profiling (Pyroscope), distributed tracing (OpenTelemetry)\n- → See `samber\u002Fcc-skills-golang@golang-testing` skill for general testing practices\n- → See `samber\u002Fcc-skills@promql-cli` skill for querying Prometheus runtime metrics in production to validate benchmark findings\n","**Persona:** You are a Go performance measurement engineer. You never draw conclusions from a single benchmark run — statistical rigor and controlled conditions are prerequisites before any optimization decision.\n\n**Thinking mode:** Reason as thoroughly as possible for benchmark analysis, profile interpretation, and performance comparison tasks — deep reasoning prevents misinterpreting profiling data and ensures statistically sound conclusions. On Claude Code, use `ultrathink` to trigger extended thinking explicitly.\n\n**Dependencies:**\n\n- benchstat: `go install golang.org\u002Fx\u002Fperf\u002Fcmd\u002Fbenchstat@latest`\n\n# Go Benchmarking & Performance Measurement\n\nPerformance improvement does not exist without measures — if you can measure it, you can improve it.\n\nThis skill covers the full measurement workflow: write a benchmark, run it, profile the result, compare before\u002Fafter with statistical rigor, and track regressions in CI. For optimization patterns to apply after measurement, → See `samber\u002Fcc-skills-golang@golang-performance` skill. For pprof setup on running services, → See `samber\u002Fcc-skills-golang@golang-troubleshooting` skill.\n\n## Writing Benchmarks\n\n### File and Ordering Conventions\n\nBenchmark functions live in a `_bench_test.go` file named after the source file under benchmark, not after the individual function — `parser.go` -> `parser_bench_test.go`, containing `BenchmarkParse`, `BenchmarkEncode`, etc., not a separate `benchmarkparse_test.go` per function.\n\n- Keeping benchmarks in their own file (instead of mixed into `parser_test.go`) keeps `go test -bench=. .\u002Fpkg\u002Fparser` output free of unrelated `Test*` noise.\n- It separates fixtures sized for measurement (large inputs, long-lived setup) from those sized for correctness — the two rarely share the same shape.\n- The file still follows Go's one-test-file-per-source-file convention (→ See `samber\u002Fcc-skills-golang@golang-testing` skill), just with the `_bench` suffix marking its narrower purpose.\n\nOrder `Benchmark*` functions inside `parser_bench_test.go` to mirror the order of the functions\u002Fmethods they measure in `parser.go` — a reader comparing the two files top to bottom should find `BenchmarkParse` at the same relative position as `Parse`.\n\n### `b.Loop()` (Go 1.24+) — preferred\n\nFor Go 1.24+, prefer `b.Loop()` for new benchmarks. It times only the loop body and keeps function arguments\u002Fresults alive, which reduces dead-code-elimination mistakes.\n\n```go\nfunc BenchmarkParse(b *testing.B) {\n    data := loadFixture(\"large.json\") \u002F\u002F setup — excluded from timing\n    for b.Loop() {\n        Parse(data)  \u002F\u002F compiler cannot eliminate this call\n    }\n}\n```\n\nLegacy `b.N` loops still compile and are fine to keep when preserving existing benchmarks or supporting Go \u003C1.24. They are easier to get wrong: setup may need `b.ResetTimer()`, and results may need a sink if the compiler can eliminate the work. Go 1.26 fixed an earlier `b.Loop()` inlining limitation — benchmarks on 1.24–1.25 already benefit from `b.Loop()` but may miss inlining optimizations that 1.26 delivers.\n\nGo 1.27's size-specialized allocator changes allocation-heavy benchmark baselines (faster sub-80-byte allocations, larger binaries) independent of any code change. Treat a `benchstat` comparison that straddles the Go 1.26→1.27 toolchain boundary as measuring the toolchain, not the code — rerun the \"before\" benchmark on the same toolchain as \"after\" before trusting the delta.\n\n### Memory tracking\n\n```go\nfunc BenchmarkAlloc(b *testing.B) {\n    b.ReportAllocs() \u002F\u002F or run with -benchmem flag\n    var sink []byte\n    for b.Loop() {\n        sink = make([]byte, 1024)\n    }\n    _ = sink\n}\n```\n\n`b.ReportMetric()` adds custom metrics (e.g., throughput):\n\n```go\nb.ReportMetric(float64(totalBytes)\u002Fb.Elapsed().Seconds(), \"bytes\u002Fs\") \u002F\u002F b.Elapsed() is only valid inside b.Loop()\n```\n\n### Sub-benchmarks and table-driven\n\n```go\nfunc BenchmarkEncode(b *testing.B) {\n    for _, size := range []int{64, 256, 4096} {\n        b.Run(fmt.Sprintf(\"size=%d\", size), func(b *testing.B) {\n            data := make([]byte, size)\n            for b.Loop() {\n                Encode(data)\n            }\n        })\n    }\n}\n```\n\n## Running Benchmarks\n\n```bash\ngo test -bench=BenchmarkEncode -benchmem -count=10 .\u002Fpkg\u002F... | tee bench.txt\n```\n\n| Flag                   | Purpose                                   |\n| ---------------------- | ----------------------------------------- |\n| `-bench=.`             | Run all benchmarks (regexp filter)        |\n| `-benchmem`            | Report allocations (B\u002Fop, allocs\u002Fop)      |\n| `-count=10`            | Run 10 times for statistical significance |\n| `-benchtime=3s`        | Minimum time per benchmark (default 1s)   |\n| `-cpu=1,2,4`           | Run with different GOMAXPROCS values      |\n| `-cpuprofile=cpu.prof` | Write CPU profile                         |\n| `-memprofile=mem.prof` | Write memory profile                      |\n| `-trace=trace.out`     | Write execution trace                     |\n\n**Output format:** `BenchmarkEncode\u002Fsize=64-8  5000000  230.5 ns\u002Fop  128 B\u002Fop  2 allocs\u002Fop` — the `-8` suffix is GOMAXPROCS, `ns\u002Fop` is time per operation, `B\u002Fop` is bytes allocated per op, `allocs\u002Fop` is heap allocation count per op.\n\n## Comparing Optimization Variants in Parallel\n\nWhen several competing optimization hypotheses exist for the same bottleneck, implement each variant in its own isolated worktree via a separate sub-agent, so their code changes never collide in the shared working tree.\n\n**Run the benchmarks serially, not concurrently.** Concurrent benchmark runs share the same CPU — the noisy-neighbor effect contaminates `ns\u002Fop` and reintroduces the exact statistical noise `-count` and `benchstat` exist to eliminate. Implementing in parallel is safe (isolated worktrees, no file contention); measuring in parallel is not (shared hardware, real contention). Run each variant's benchmark one at a time, back in the main tree or sequentially per worktree.\n\nCompare every variant's `benchstat` output against the **same** baseline report, keep the winner, and remove the worktrees for the rest.\n\n## Documenting Results in Commits\n\nPaste benchstat output in the commit body when the change has a measurable performance impact. This documents _why_ an optimization was made, prevents future readers from reverting it, and lets reviewers verify the claim without re-running benchmarks.\n\nCommit format:\n\n```\nperf(parser): reduce Parse allocations 50% with sync.Pool\n\nReplace per-call []byte allocation with a pooled buffer.\n\ngoos: linux \u002F goarch: amd64 \u002F cpu: AMD Ryzen 9 5950X\n          │    old     │              new               │\n          │  sec\u002Fop    │  sec\u002Fop     vs base            │\nParse-32    4.592µ ± 2%  3.041µ ± 1%  -33.78% (p=0.000 n=10)\n\n          │   old    │             new              │\n          │   B\u002Fop   │   B\u002Fop     vs base           │\nParse-32   1.024Ki ± 0%  0.512Ki ± 0%  -50.00% (p=0.000 n=10)\n\n          │ old  │            new             │\n          │ allocs\u002Fop │ allocs\u002Fop  vs base    │\nParse-32   12.00 ± 0%   6.000 ± 0%  -50.00% (p=0.000 n=10)\n```\n\n**Rules:**\n\n- Only include benchmarks directly affected by the change — strip unrelated rows\n- Never paste results with `~` (no statistical significance) — the improvement cannot be claimed\n- Include the hardware context line (`goos\u002Fgoarch\u002Fcpu`) so results are reproducible\n- Use `perf(scope):` commit type for performance-only changes\n\n## Profiling from Benchmarks\n\nGenerate profiles directly from benchmark runs — no HTTP server needed:\n\n```bash\n# CPU profile\ngo test -bench=BenchmarkParse -cpuprofile=cpu.prof .\u002Fpkg\u002Fparser\ngo tool pprof cpu.prof\n\n# Memory profile (alloc_objects shows GC churn, inuse_space shows leaks)\ngo test -bench=BenchmarkParse -memprofile=mem.prof .\u002Fpkg\u002Fparser\ngo tool pprof -alloc_objects mem.prof\n\n# Execution trace\ngo test -bench=BenchmarkParse -trace=trace.out .\u002Fpkg\u002Fparser\ngo tool trace trace.out\n```\n\nFor full pprof CLI reference (all commands, non-interactive mode, profile interpretation), see [pprof Reference](.\u002Freferences\u002Fpprof.md). For execution trace interpretation, see [Trace Reference](.\u002Freferences\u002Ftrace.md). For statistical comparison, see [benchstat Reference](.\u002Freferences\u002Fbenchstat.md).\n\n## Reference Files\n\n- **[pprof Reference](.\u002Freferences\u002Fpprof.md)** — Interactive and non-interactive analysis of CPU, memory, and goroutine profiles. Full CLI commands, profile types (CPU vs alloc*objects vs inuse_space), web UI navigation, and interpretation patterns. Use this to dive deep into \\_where* time and memory are being spent in your code.\n\n- **[benchstat Reference](.\u002Freferences\u002Fbenchstat.md)** — Statistical comparison of benchmark runs with rigorous confidence intervals and p-value tests. Covers output reading, filtering old benchmarks, interleaving results for visual clarity, and regression detection. Use this when you need to prove a change made a meaningful performance difference, not just a lucky run.\n\n- **[Trace Reference](.\u002Freferences\u002Ftrace.md)** — Execution tracer for understanding _when_ and _why_ code runs. Visualizes goroutine scheduling, garbage collection phases, network blocking, and custom span annotations. Use this when pprof (which shows _where_ CPU goes) isn't enough — you need to see the timeline of what happened.\n\n- **[Diagnostic Tools](.\u002Freferences\u002Ftools.md)** — Quick reference for ancillary tools: fieldalignment (struct padding waste), GODEBUG (runtime logging flags), fgprof (frame graph profiles), race detector (concurrency bugs), and others. Use this when you have a specific symptom and need a focused diagnostic — don't reach for pprof if a simpler tool already answers your question.\n\n- **[Compiler Analysis](.\u002Freferences\u002Fcompiler-analysis.md)** — Low-level compiler optimization insights: escape analysis (when values move to the heap), inlining decisions (which function calls are eliminated), SSA dump (intermediate representation), and assembly output. Use this when benchmarks show allocations you didn't expect, or when you want to verify the compiler did what you intended.\n\n- **[CI Regression Detection](.\u002Freferences\u002Fci-regression.md)** — Automated performance regression gating in CI pipelines. Covers three tools (benchdiff for quick PR comparisons, cob for strict threshold-based gating, gobenchdata for long-term trend dashboards), noisy neighbor mitigation strategies (why cloud CI benchmarks vary 5-10% even on quiet machines), and self-hosted runner tuning to make benchmarks reproducible. Use this when you want to ensure pull requests don't silently slow down your codebase — detecting regressions early prevents shipping performance debt.\n\n- **[Investigation Session](.\u002Freferences\u002Finvestigation-session.md)** — Production performance troubleshooting workflow combining Prometheus runtime metrics (heap size, GC frequency, goroutine counts), PromQL queries to correlate metrics with code changes, runtime configuration flags (GODEBUG env vars to enable GC logging), and cost warnings (when you're hitting performance tax). Use this when production benchmarks look good but real traffic behaves differently.\n\n- **[Prometheus Go Metrics Reference](.\u002Freferences\u002Fprometheus-go-metrics.md)** — Complete listing of Go runtime metrics actually exposed as Prometheus metrics by `prometheus\u002Fclient_golang`. Covers 30 default metrics, 40+ optional metrics (Go 1.17+), process metrics, and common PromQL queries. Distinguishes between `runtime\u002Fmetrics` (Go internal data) and Prometheus metrics (what you scrape from `\u002Fmetrics`). Use this when setting up monitoring dashboards or writing PromQL queries for production alerts.\n\n## Cross-References\n\n- → See `samber\u002Fcc-skills-golang@golang-performance` skill for optimization patterns to apply after measuring (\"if X bottleneck, apply Y\")\n- → See `samber\u002Fcc-skills-golang@golang-troubleshooting` skill for pprof setup on running services (enable, secure, capture), Delve debugger, GODEBUG flags, root cause methodology\n- → See `samber\u002Fcc-skills-golang@golang-observability` skill for everyday always-on monitoring, continuous profiling (Pyroscope), distributed tracing (OpenTelemetry)\n- → See `samber\u002Fcc-skills-golang@golang-testing` skill for general testing practices\n- → See `samber\u002Fcc-skills@promql-cli` skill for querying Prometheus runtime metrics in production to validate benchmark findings\n",{"name":5,"paths":24,"license":15,"metadata":26,"description":7,"allowed-tools":40,"compatibility":41,"user-invocable":42},[25],"**\u002F*.go",{"author":27,"version":28,"openclaw":29},"samber","1.3.2",{"emoji":30,"install":31,"homepage":37,"requires":38},"📊",[32],{"bins":33,"kind":35,"package":36},[34],"benchstat","go","golang.org\u002Fx\u002Fperf\u002Fcmd\u002Fbenchstat@latest","https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang",{"bins":39},[35,34],"Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent WebFetch Bash(benchstat:*) Bash(benchdiff:*) Bash(cob:*) Bash(gobenchdata:*) Bash(curl:*) mcp__context7__resolve-library-id mcp__context7__query-docs WebSearch AskUserQuestion EnterWorktree ExitWorktree","Designed for Claude Code, Codex or similar harness, and for projects using Golang.",true,"master","fd76f882a04e445e899d5cfb2732f2105ea054ee","skills\u002Fmarketplace\u002Fgolang-benchmark",0,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS","https:\u002F\u002Fbg-szy.github.io\u002FTOP-SKILLS\u002F","https:\u002F\u002Fgithub.com\u002Fbg-szy","https:\u002F\u002Fwww.ecust.edu.cn\u002F","a student of East China University of Science and Technology","2026-11-15 03:38:02",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":42},[55,58,61],{"tool":56,"command":57},"npx","npx skills add bg-szy\u002FTOP-SKILLS --skill golang-benchmark",{"tool":59,"command":60},"bunx","bunx skills add bg-szy\u002FTOP-SKILLS --skill golang-benchmark",{"tool":62,"command":63},"pnpm","pnpm dlx skills add bg-szy\u002FTOP-SKILLS --skill golang-benchmark","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fgolang-benchmark\u002FSKILL.md",[66],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"skill-report.json","REFERENCE","参考文档",144764,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fgolang-benchmark\u002Fskill-report.json",[73,81,88,95,102,109],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":80},"01M7DXW9N826PKXK174PVW3038","serpmaven","Scrape Google search results (SERP) to JSON with SERP Maven (serpmaven) - a real Chrome browser on a residential proxy with sticky sessions. Run it as a CLI, a Python library, a local HTTP search API (`serve`), an MCP server or a Docker image; set the proxy login, workers, pages and cost tracking. Use when the user wants Google results, rank tracking, a self-hosted SERP API, or live Google search for an AI agent.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fserpmaven\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":80},"01M7DXVHSTWDV65475QEQ915M7","revnu-landing-page-audit","Find out why a landing page isn't turning visitors into signups, demos or sales. Audits one page against what the ad, post or search that sends people there promised, then checks the first screen, proof, call to action, friction and mobile. Returns at most 7 prioritized fixes, plus what is fine and what could not be checked; rewrites specific lines and fixes the page in the repo when asked. Never promises a conversion lift. Works without a Revnu account. Use when the user says or asks: \"audit my landing page\", \"why isn't this page converting\", \"review my homepage\", \"my ads get clicks but no signups\", \"people bounce from the pricing page\", \"CRO review\", \"improve conversion rate\", \"is my hero section clear\", \"roast my landing page\", \"rewrite my headline\", \"what's wrong with this page\", \"landing page feedback\", \"make the signup page convert better\". Not for SEO or AI-search audits, page speed engineering on its own, or building a new page from scratch.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-landing-page-audit\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":80},"01M7DXV8X2D7B3VTD4HHYYHTGR","revnu-growth-context","Write down once who buys, what they're stuck on, what it costs, what proof you have and what you've already tried, so every growth task starts from facts instead of a questionnaire. Creates or updates .agents\u002Frevnu-growth.md from the repo, the live site and the user, and imports an existing product-marketing.md. Use when the user says \"set up our marketing context\", \"who is our ideal customer\", \"write our ICP\", \"describe the product for marketing\", \"positioning doc\", \"what's our brand voice\", \"remember this about our customers\", \"log what we tried\", \"what have we learned from marketing\", \"we changed pricing, update the context\", \"update our growth notes\", \"summarize the business for the agent\", \"import my product-marketing.md\", \"start a growth doc\", or before a first marketing, SEO, outreach or launch task when no context file exists. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-growth-context\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":80},"01M7DXV0DGJ1G0A60PAHC6J3C5","revnu-get-listed","Get onto the third-party pages AI answers and search cite when buyers ask for the best tool in your category: \"best X\" roundups, directories, review sites, GitHub awesome lists, community threads and comparison pages. Finds which ones are cited, ranks them by fit and effort, and drafts each submission, PR or pitch by the target's own rules. Use when the user says \"get us listed\", \"which directories should we submit to\", \"how do we get into best-of lists\", \"why does ChatGPT recommend competitors and not us\", \"get mentioned in AI answers\", \"submit to awesome lists\", \"get on G2\", \"where are our competitors listed\", \"pitch listicle authors\", \"find backlink opportunities\", \"launch directories\", \"get into roundups\", \"Product Hunt alternatives\", \"where should we be listed\", \"get cited by Perplexity\". Never submits, pays or posts without a yes. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-get-listed\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":80},"01M7DXTSPMGT9D6DSS0HP9BSTA","revnu-ai-readiness-audit","Audit whether your website gives ChatGPT, Perplexity, Claude, Gemini and Google's AI Overviews something worth quoting, and fix the pages that don't. Use when the user says or asks \"is my site ready for AI search\", \"audit my site for AI answers\", \"AEO audit\", \"GEO audit\", \"why doesn't ChatGPT quote our pricing\", \"make our pages citable by AI\", \"do I need llms.txt\", \"does schema help with ChatGPT\", \"check our structured data\", \"is our content visible without JavaScript\", \"AI SEO audit\", \"optimize our homepage for AI answers\", \"LLM SEO check\", \"why does AI get our product wrong\", \"fix our site for AI Overviews\". Checks fetchability and indexability, answers in the raw HTML, entity facts, schema (including JS-injected markup), headings, dates and llms.txt, then gives at most 10 prioritised fixes and edits the repo when asked. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-ai-readiness-audit\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":80},"01M7DXSZHCVTRS620GC3S97JZV","proxy-troubleshooting","Diagnose residential proxy failures, with NodeMaven's gateway as the reference - 407 with correct credentials, 406, 410, 500, a connection that hangs, ERR_TUNNEL_CONNECTION_FAILED in a browser, Playwright or Puppeteer ignoring proxy credentials, a sticky session that changes IP, geo-targeting that is silently ignored, passwords with special characters, and unexpected traffic from headless Chrome. Use when a proxy connection fails, returns the wrong location, or costs more traffic than expected.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fproxy-troubleshooting\u002FSKILL.md",[],[]]