rc: enable go profiling by default on the --rc port

This means you can use the pprof tool on a running rclone, eg

    go tool pprof http://localhost:5572/debug/pprof/heap
This commit is contained in:
Nick Craig-Wood
2018-05-11 11:12:58 +01:00
parent 7bf2d389a8
commit 573ef4c8ee
2 changed files with 47 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ import (
"encoding/json"
"io"
"net/http"
_ "net/http/pprof" // install the pprof http handlers
"strings"
"github.com/ncw/rclone/cmd/serve/httplib"