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 שעות
התקנה
עדיין אין לכם את ה-CLI של NotHoly? התקינו אותו קודם.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install aeondave/golang-performanceנכתב אל ~/.notholy/skills אחרי בדיקת החתימה וה-SHA-256.
חתימהחתום, ed25519
חבילה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
Make it measurable
- Add a benchmark (or a reproducible load test) for the suspected hotspot.
- Run multiple iterations; record mean + variance.
Capture evidence
- CPU profile for time
- Heap/allocs profile for memory
- Mutex/block profiles for contention
- Trace when the scheduler / GC behavior matters
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
- Identify top offenders (
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
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 ->
goroutineleakprofile, 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 andgo testcapture) +goroutineleak+ flight recorderreferences/benchmarks.md— stable benchmarks, -benchmem, benchstat, hygienereferences/allocations-gc.md— allocation patterns, Green Tea GC, slice retention, sync.Poolreferences/contention.md— mutex/block profiles, contention patterns, backpressurereferences/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
הקבצים בגרסה הזו
references/518.4 KB
- allocations-gc.md2.9 KB
- benchmarks.md2.1 KB
- compiler-and-runtime-tuning.md7.7 KB
- contention.md1.4 KB
- profiling.md4.3 KB
- SKILL.md4.0 KB
הרשאות
| הרשאה | הוצהר | נמצא בסריקה |
|---|---|---|
| קורא קבצים | לא | לא |
| כותב קבצים | כן | כן |
| מריץ פקודות shell | כן | כן |
| משתמש ברשת | כן | כן |
| משתמש במחברים | לא | לא |
| שולט בדפדפן | לא | לא |
ממצאי הסריקה
נבדק ב-13 בנוב׳ 2026
- בינוניתקישור · קישור לכתובת IP ישירהreferences/compiler-and-runtime-tuning.md:103
- בינוניתקישור · קישור לכתובת IP ישירהreferences/profiling.md:43
- בינוניתקישור · קישור לכתובת IP ישירהreferences/profiling.md:55
- בינוניתקישור · קישור לכתובת IP ישירהreferences/profiling.md:56
- בינוניתקישור · קישור לכתובת IP ישירהreferences/profiling.md:74
- בינוניתקישור · קישור לכתובת IP ישירהreferences/profiling.md:75
- בינוניתקישור · קישור לכתובת IP ישירהreferences/profiling.md:94
- בינוניתקישור · קישור לכתובת IP ישירהreferences/profiling.md:110
- מידעקישור · קישורים לדומיינים חיצוניים
סריקה נקייה מורידה את הסיכון, אבל לא מוכיחה שהחבילה בטוחה. כדאי לקרוא מה מתקינים.
| גרסה | פורסמה | Commit | SHA-256 | חתימה | שינוי בהרשאות |
|---|---|---|---|---|---|
| v2026.11.13-21cd568 | 13 בנוב׳ 2026 | 21cd568 | 6cc84c1b | חתומה | – |
עוד מ-AeonDave
הכול מהמפרסם הזהעוד בקטגוריה דוחות ותאימות
לקטגוריה- skillduty1g/skill5
- rea-ci-tests-auditmorluto/rea-ci-tests-audit4
- tracking-threat-actor-infrastructuremukul975/tracking-threat-actor-infrastructure4
- performing-authenticated-scan-with-openvasmukul975/performing-authenticated-scan-with-openvas4
- slicing-code-contexttrailofbits/slicing-code-context4
- 1337aeondave/13374
שאלו כל מה שהסקופ מאפשר.
יוצרים חשבון, מוסיפים קרדיטים ושואלים את השאלה הראשונה בצ׳אט או בטרמינל.
- 1/3
יצירת חשבון
פרטי או חברה. אפשר לעבור לחשבון חברה אחר כך בלי לאבד יתרה או מפתחות.
פרטיחברה - 2/3
הוספת קרדיטים
בכרטיס אשראי. תשלום לפי טוקן, בלי מנוי.
$5.00טעינה מינימלית - 3/3
שאלה ראשונה
בצ׳אט, או להתקין את ה-CLI ולהריץ notholy login בטרמינל.
$ notholy login