rakyll / gom

A visual interface to work with runtime profiling data for Go
Apache License 2.0
1.29k stars 42 forks source link

gom GoDoc Build Status

A visual interface to work with runtime profiling data from Go programs.

Installation

go get github.com/rakyll/gom/cmd/gom

The program you're willing to profile should import the github.com/rakyll/gom/http package. The http package will register several handlers to provide information about your program during runtime.

import _ "github.com/rakyll/gom/http"

// If your application is not already running an http server,
// you need to start one.
log.Println(http.ListenAndServe("localhost:6060", nil))

If your HTTP server is not going to handle the http.DefaultServeMux, you need to manually register the gom handler to respond to "/debug/_gom".

For example, gorilla/mux users can use the snippet below:

import gomhttp "github.com/rakyll/gom/http"

mux := http.NewServeMux()
mux.HandleFunc("/debug/_gom", gomhttp.Handler())
log.Println(http.ListenAndServe("localhost:6060", nil))

Now, you are ready to launch gom.

$ gom

Goals

Minor Goals