Skip to content

Commit

Permalink
enable pprof
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed May 12, 2024
1 parent 6982455 commit 230f7dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/fsd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/hex"
"errors"
"flag"
"log"
"net"
"net/http"
"os"
Expand All @@ -29,6 +30,8 @@ import (
"go.uber.org/zap/zapcore"
"gopkg.in/yaml.v3"
"lukechampine.com/frand"

_ "net/http/pprof"
)

var (
Expand Down Expand Up @@ -81,6 +84,10 @@ func mustLoadConfig(dir string, log *zap.Logger) {
}

func main() {
go func() {
log.Println(http.ListenAndServe("localhost:6060", nil))
}()

// configure console logging note: this is configured before anything else
// to have consistent logging. File logging will be added after the cli
// flags and config is parsed
Expand Down

0 comments on commit 230f7dd

Please sign in to comment.