diff --git a/cpu.prof b/cpu.prof new file mode 100644 index 0000000..ee86df5 Binary files /dev/null and b/cpu.prof differ diff --git a/main.go b/main.go index a0498a3..1f9c3d1 100644 --- a/main.go +++ b/main.go @@ -6,6 +6,7 @@ import ( "fmt" "io" "os" + "runtime/pprof" "slices" "strconv" "strings" @@ -72,6 +73,11 @@ func (puz *Puzzle) getSector(secIndex int) []int { } func main() { + f, _ := os.Create("cpu.prof") + defer f.Close() + pprof.StartCPUProfile(f) + defer pprof.StopCPUProfile() + var debug bool flag.BoolVar(&debug, "debug", false, "turns on debug mode, extra logging") flag.Parse()