Pular para o conteúdo
Novo

DeepSeek V4.1 Flash grátis por 7 dias: 10M tokens por dia após recarga de $10 ou mais. Até 30/11.

Como funciona
aeondave/golang-performanceRelatórios e compliance

golang-performance

⁨Go performance workflow: benchmark and profile (pprof/trace), identify hotspots, reduce allocations/GC and contention, and verify improvements with repeatable measurement. Use only after you have evidence the Go code is the bottleneck.⁩

v2026.11.13-21cd5683 instalações+3 em 7 dias39 EstrelasMITsincronizado há 11 horas

Instalar

Ainda não tem a CLI da NotHoly? Instale primeiro.

$ curl -fsSL https://notholy.com/install.sh | sh
$ notholy skills install aeondave/golang-performance

Grava em ⁦~/.notholy/skills⁩ depois de conferir a assinatura e o SHA-256.

AssinaturaAssinado, ed25519
S5VAd2xzJ6…zCywIqDg==A CLI confere o SHA-256 e a assinatura antes de gravar qualquer arquivo.
Pacote6cc84c1b…44f627ba
6cc84c1bb58f…733d44f627ba6 arquivos · ⁦9.7 KB⁩
VarreduraMédio9 achados
  • Link para um IP diretoreferences/compiler-and-runtime-tuning.md:103
  • Link para um IP diretoreferences/profiling.md:43
  • Link para um IP diretoreferences/profiling.md:55
Ver a varredura completa
Fontegithub.com/AeonDave/malskill/tree/main/coding/golang-performance@21cd568

Este item ainda não foi escrito no seu idioma, então aparece em English.

This skill is about measurement-first optimization in Go.

When to activate

Use this skill when you need to:

  • Confirm a performance regression (latency/throughput/CPU/memory)
  • Identify hot paths with pprof (CPU / heap / mutex / block)
  • Reduce allocations and GC pressure in a measured hotspot
  • Fix contention (mutex, scheduler, channel backpressure)
  • Validate improvements with benchmarks and repeatable runs

If you need general idioms and patterns (not measurement), use golang-patterns.


Rules of engagement

  • Profile before optimizing. A fast guess beats a slow change.
  • Change one thing at a time. Measure after each change.
  • Keep a baseline. Every claim should have “before vs after”.
  • Don’t optimize the cold path. Make the hot path boring.

Outcome expectations

  • Performance claims are backed by reproducible before/after measurements.
  • Profile type selection matches the observed symptom.
  • Optimizations are incremental, attributable, and regression-resistant.

Workflow

  1. Make it measurable

    • Add a benchmark (or a reproducible load test) for the suspected hotspot.
    • Run multiple iterations; record mean + variance.
  2. Capture evidence

    • CPU profile for time
    • Heap/allocs profile for memory
    • Mutex/block profiles for contention
    • Trace when the scheduler / GC behavior matters
  3. Analyze before changing code

    • Identify top offenders (top, top -cum)
    • Inspect annotated source (list)
    • Confirm whether you are bound by CPU, allocations, syscalls, or contention
  4. Apply targeted fixes

    • Allocation and GC: reduce allocations, reuse buffers, avoid retaining large backing arrays
    • Data layout: improve locality, avoid interface boxing in hot loops
    • Concurrency: reduce contention, bound goroutines, add backpressure
  5. Verify and document

    • Re-run the benchmark/profile
    • Ensure correctness isn’t traded away
    • Record the change and its measured impact

Symptom to first profile mapping

  • High CPU -> CPU profile
  • Memory growth -> heap profile (compare snapshots)
  • High allocation churn / GC pressure -> allocs profile
  • Latency spikes without CPU spike -> block profile
  • Lock contention suspicion -> mutex profile
  • Scheduler/pathological latency behavior -> runtime trace (flight recorder for rare events)
  • Growing goroutine count / suspected stuck workers -> goroutineleak profile, then the full goroutine profile
  • Shipped binary that is already profile-tuned and needs final runtime/build tuning -> compiler-and-runtime-tuning.md

Safety note: exposing pprof

net/http/pprof endpoints can leak sensitive runtime data. Prefer:

  • bind to localhost
  • protect with auth / firewall
  • enable only in dev / controlled environments

Resources

Load these references on demand:

  • references/profiling.md — pprof + trace (HTTP and go test capture) + goroutineleak + flight recorder
  • references/benchmarks.md — stable benchmarks, -benchmem, benchstat, hygiene
  • references/allocations-gc.md — allocation patterns, Green Tea GC, slice retention, sync.Pool
  • references/contention.md — mutex/block profiles, contention patterns, backpressure
  • references/compiler-and-runtime-tuning.md — load when code-level fixes have landed and you need PGO, GOGC/GOMEMLIMIT, GOMAXPROCS/cgroup, GC/cgo/thread knobs, or shipped-binary build flags

Arquivos desta versão

Permissões

PermissãoDeclaradaEncontrada na varredura
Lê arquivosNãoNão
Grava arquivosSimSim
Roda comandos no shellSimSim
Usa a redeSimSim
Usa conectoresNãoNão
Controla um navegadorNãoNão

Achados da varredura

Revisado em 13 de nov. de 2026

  1. MédiaLink · Link para um IP diretoreferences/compiler-and-runtime-tuning.md:103
  2. MédiaLink · Link para um IP diretoreferences/profiling.md:43
  3. MédiaLink · Link para um IP diretoreferences/profiling.md:55
  4. MédiaLink · Link para um IP diretoreferences/profiling.md:56
  5. MédiaLink · Link para um IP diretoreferences/profiling.md:74
  6. MédiaLink · Link para um IP diretoreferences/profiling.md:75
  7. MédiaLink · Link para um IP diretoreferences/profiling.md:94
  8. MédiaLink · Link para um IP diretoreferences/profiling.md:110
  9. InfoLink · Links para domínios externos

Uma varredura limpa reduz o risco, mas não prova que o pacote é seguro. Leia o que você instala.

VersãoPublicada emCommitSHA-256AssinaturaMudança de permissão
v2026.11.13-21cd56813 de nov. de 202621cd5686cc84c1bAssinada–

Pergunte tudo o que o seu escopo permite.

Crie a conta, adicione créditos e faça a primeira pergunta no chat ou no terminal.

  1. 1/3

    Crie a conta

    Individual ou empresa. Dá para virar empresa depois sem perder saldo nem chaves.

    Pessoa físicaEmpresa
  2. 2/3

    Adicione créditos

    No cartão. Você paga por token, sem assinatura.

    $5.00recarga mínima
  3. 3/3

    Pergunte

    No chat, ou instale o CLI e rode notholy login no terminal.

    $ notholy login