Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #282 from vania-pooh/master
Browse files Browse the repository at this point in the history
Added ability to build Ggr with pprof support (fixes #281)
  • Loading branch information
vania-pooh authored Jul 24, 2019
2 parents bbf99bb + 28d0eb9 commit c20f40e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pprof.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// +build pprof

package main

import _ "net/http/pprof"
4 changes: 3 additions & 1 deletion proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const (
)

var paths = struct {
Ping, Status, Err, Host, Quota, Route, Proxy, VNC, Video, Logs, Download, Clipboard, Devtools string
Ping, Status, Err, Host, Quota, Route, Proxy, VNC, Video, Logs, Download, Clipboard, Devtools, Pprof string
}{
Ping: "/ping",
Status: "/wd/hub/status",
Expand All @@ -54,6 +54,7 @@ var paths = struct {
Download: "/download/",
Clipboard: "/clipboard/",
Devtools: "/devtools/",
Pprof: "/debug/pprof/",
}

var keys = struct {
Expand Down Expand Up @@ -767,5 +768,6 @@ func mux() http.Handler {
mux.HandleFunc(paths.Download, WithSuitableAuthentication(authenticator, download))
mux.HandleFunc(paths.Clipboard, WithSuitableAuthentication(authenticator, clipboard))
mux.HandleFunc(paths.Devtools, devtools)
mux.Handle(paths.Pprof, http.DefaultServeMux)
return mux
}

0 comments on commit c20f40e

Please sign in to comment.