Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Enable pprof
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprodan committed Feb 3, 2018
1 parent 4f1336a commit 78523f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ _testmain.go
# Tool related configurations
.ackrc
.envrc
.idea

# Specific to this project
vendor/*
Expand Down
3 changes: 2 additions & 1 deletion cmd/fluxd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"io/ioutil"
"net/http"
_ "net/http/pprof"
"os"
"os/exec"
"os/signal"
Expand Down Expand Up @@ -335,7 +336,7 @@ func main() {

// HTTP transport component, for metrics
go func() {
mux := http.NewServeMux()
mux := http.DefaultServeMux
mux.Handle("/metrics", promhttp.Handler())
handler := daemonhttp.NewHandler(daemonRef, daemonhttp.NewRouter())
mux.Handle("/api/flux/", http.StripPrefix("/api/flux", handler))
Expand Down

0 comments on commit 78523f4

Please sign in to comment.