git » firstones » main » tree

[main] / pprof.go

// This file enables http pprof support. It's only used when the pprof build
// tag is specified.
//
// To build:
//   go build -tags pprof
// Run as normal:
//   ./firstones http :9595
// CPU profile:
//   go tool pprof -http localhost:9400 -no_browser 'http://localhost:9595/debug/pprof/profile?debug=1&seconds=60'

//go:build pprof

package main

import (
	"fmt"
	_ "net/http/pprof"
)

func init() {
	fmt.Println("pprof enabled")
}