원클릭으로
go-benchmarking
Benchmarks y profiling en Go. Usar al medir rendimiento, comparar implementaciones, o identificar bottlenecks.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Benchmarks y profiling en Go. Usar al medir rendimiento, comparar implementaciones, o identificar bottlenecks.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Guía para trabajar con StructureDefinitions y ElementDefinitions en FHIR. Usar cuando se necesite entender o manipular definiciones de estructura.
Diseño de arquitectura limpia y modular en Go. Usar al diseñar un nuevo módulo, definir capas y responsabilidades, u organizar código.
Patrones de caching y pooling en Go. Usar al implementar caches, reducir allocations, o cachear resultados costosos.
Revisión de código Go. Usar al revisar PRs, verificar calidad de código, o identificar problemas potenciales.
Composición, embedding y extensibilidad en Go. Usar al extender tipos existentes o combinar comportamientos.
Concurrencia, goroutines y thread-safety en Go. Usar al diseñar código concurrente o manejar recursos compartidos.
| name | go-benchmarking |
| description | Benchmarks y profiling en Go. Usar al medir rendimiento, comparar implementaciones, o identificar bottlenecks. |
| allowed-tools | Read, Grep, Glob, Bash(go test -bench:*, go tool pprof:*, go tool trace:*) |
Benchmarks y profiling de rendimiento en Go.
func BenchmarkCompile(b *testing.B) {
for i := 0; i < b.N; i++ {
_, _ = fhirpath.Compile("Patient.name.given")
}
}
func BenchmarkEvaluate(b *testing.B) {
expr := fhirpath.MustCompile("Patient.name.given")
b.ResetTimer() // No contar setup
for i := 0; i < b.N; i++ {
_, _ = expr.Evaluate(patientJSON)
}
}
# Todos los benchmarks
go test -bench=. -benchmem ./...
# Benchmark específico
go test -bench=BenchmarkValidate ./validator
# Con CPU profile
go test -bench=BenchmarkX -cpuprofile=cpu.prof
go tool pprof cpu.prof
# Con memory profile
go test -bench=BenchmarkX -memprofile=mem.prof
go tool pprof mem.prof
BenchmarkCompile-8 50000 30123 ns/op 12048 B/op 234 allocs/op
│ │ │ │
│ │ │ └─ Allocations por op
│ │ └─ Bytes por op
│ └─ Nanosegundos por op
└─ Número de iteraciones