Перейти к содержимому
New

DeepSeek V4.1 Flash free for 7 days: 10M tokens a day after a top-up of $10 or more. Until Nov 30.

How it works
aeondave/golang-performanceОтчеты и соответствие требованиям

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 установки+3 за 7 дней39 ЗвездыMITсинхронизировано 11 часов назад

Установка

Ещё нет NotHoly CLI? Сначала установите её.

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

Пишет в ⁦~/.notholy/skills⁩ после проверки подписи и SHA-256.

ПодписьПодписано, ed25519
S5VAd2xzJ6…zCywIqDg==CLI проверяет SHA-256 и подпись, прежде чем записать хоть один файл.
Пакет6cc84c1b…44f627ba
6cc84c1bb58f…733d44f627ba6 файлов · ⁦9.7 KB⁩
ПроверкаСредний9 замечаний
  • Ссылка на IP-адресreferences/compiler-and-runtime-tuning.md:103
  • Ссылка на IP-адресreferences/profiling.md:43
  • Ссылка на IP-адресreferences/profiling.md:55
Вся проверка
Источникgithub.com/AeonDave/malskill/tree/main/coding/golang-performance@21cd568

Эта запись еще не переведена на русский, поэтому показан текст на другом языке: 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

Файлы этой версии

Права

ПравоЗаявленоНайдено проверкой
Читает файлыНетНет
Пишет файлыДаДа
Выполняет команды shellДаДа
Ходит в сетьДаДа
Использует коннекторыНетНет
Управляет браузеромНетНет

Замечания проверки

Проверено 13 нояб. 2026 г.

  1. СредняяСсылка · Ссылка на IP-адресreferences/compiler-and-runtime-tuning.md:103
  2. СредняяСсылка · Ссылка на IP-адресreferences/profiling.md:43
  3. СредняяСсылка · Ссылка на IP-адресreferences/profiling.md:55
  4. СредняяСсылка · Ссылка на IP-адресreferences/profiling.md:56
  5. СредняяСсылка · Ссылка на IP-адресreferences/profiling.md:74
  6. СредняяСсылка · Ссылка на IP-адресreferences/profiling.md:75
  7. СредняяСсылка · Ссылка на IP-адресreferences/profiling.md:94
  8. СредняяСсылка · Ссылка на IP-адресreferences/profiling.md:110
  9. ИнфоСсылка · Ссылки на внешние домены

Чистая проверка снижает риск, но не доказывает, что пакет безопасен. Читайте то, что ставите.

ВерсияОпубликованаКоммитSHA-256ПодписьИзменение прав
v2026.11.13-21cd56813 нояб. 2026 г.21cd5686cc84c1bПодписана–

Спрашивайте обо всём, что позволяет ваш скоуп.

Создайте аккаунт, пополните баланс и задайте первый вопрос в чате или в терминале.

  1. 1/3

    Создайте аккаунт

    Личный или для компании. Позже можно перейти на аккаунт компании без потери баланса и ключей.

    ЛичныйКомпания
  2. 2/3

    Пополните баланс

    Картой. Оплата за токены, без подписки.

    $5.00минимальное пополнение
  3. 3/3

    Спрашивайте

    В чате, или установите CLI и выполните notholy login в терминале.

    $ notholy login