Skip to content

Commit

Permalink
Add pprof
Browse files Browse the repository at this point in the history
  • Loading branch information
whywaita committed Jan 15, 2025
1 parent 374010c commit e36fcb2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/server/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"context"
"fmt"
"log"
"net/http"
"runtime"
"strings"
"time"

Expand Down Expand Up @@ -31,6 +33,12 @@ func init() {
}

func main() {
runtime.SetBlockProfileRate(1)
runtime.SetMutexProfileFraction(1)
go func() {
log.Fatal(http.ListenAndServe("localhost:6060", nil))
}()

myshoes, err := newShoes()
if err != nil {
log.Fatalln(err)
Expand Down

0 comments on commit e36fcb2

Please sign in to comment.