Courses
Go Advanced: Performance, Concurrency, and Production
Check Yourself
Five scenario questions on pprof CPU/heap profiles, t.Cleanup, goroutine leaks, and go test -timeout.
Course content
Join this Course
Sign in to save your progress.
-
Bounded Concurrency and Worker Pools
-
Bound Concurrency With a Worker Pool
-
Coordinate Shared State With sync.Mutex and atomic
-
-
-
Memory, Allocations, and Benchmarking
-
Measure Speed and Allocations With go test -bench
-
Cut Allocations With Pre-Sizing and sync.Pool
-
-
-
Profiling and Diagnostics
-
Find CPU and Heap Hotspots With pprof
-
Catch Goroutine Leaks and Slow Tests Early
-
-
-
Resilience and Defensive HTTP
-
Add Retries With Backoff and Jitter
-
Protect Endpoints With Rate Limiting and Panic Recovery
-
-
-
Production Builds and Containers
-
Embed Static Assets and Version Info With embed and ldflags
-
Ship a Multi-Stage Scratch Go Container
-
-
-
Fuzzing, GC Tuning, Tracing, and Reflection
-
Fuzz Testing Parsers and Decoders With go test -fuzz
-
Escape Analysis and GC Tuning (-gcflags="-m", GOGC, GOMEMLIMIT)
-
Execution Tracing and Block/Mutex Contention Profiling
-
Reflection, Struct Tags, and go generate
-
-
1.
In `go tool pprof -top` output, what is the difference between `flat` and `cum`?
2.
If you import `_ "net/http/pprof"` to diagnose a production service, how should you expose `/debug/pprof/`?
3.
In `TestWorkerExitsOnCleanup`, why did `t.Cleanup` cancel `ctx` and wait on `<-done`?
4.
Why pass `-timeout=30s` to `go test` in CI?
5.
Before rewriting code for speed, what should you do first?
About
Five scenario questions on pprof CPU/heap profiles, t.Cleanup, goroutine leaks, and go test -timeout.
- Duration
- 5 min
- Last update
- 11/27/2026
Was this helpful?
0
0
Comments
Sign in to commentNo comments yet.