INNER CODE UNIT · Go
startProfiling
andrearaponi/dito · cmd/main.go:172
func startProfiling(logger *slog.Logger) {
// Start the profiling server for performance analysis
go func() {
logger.Info("Starting pprof on :6060")
if err := http.ListenAndServe("localhost:6060", nil); err != nil {
logger.Error("pprof failed", "error", err)
}
}()
// Enable mutex profiling to help identify lock contention issues
runtime.SetMutexProfileFraction(1)
// Enable block profiling to help identify blocking operations
runtime.SetBlockProfileRate(1)
}