delve/vendor/github.com/pkg/profile
aarzilli a357ce0638 tests: fix typecheckrpc.go and convert it to a test
We forgot to run typecheckrpc.go periodically and it didn't work
anymore and there were some minor errors in service/rpc2/client.go.

Rewrite typecheckrpc.go using go/packages, so that it works with go1.11
and go.mod, and fix the issues in client.go
2019-01-07 11:47:49 -08:00
..
.travis.yml tests: fix typecheckrpc.go and convert it to a test 2019-01-07 11:47:49 -08:00
AUTHORS tests: fix typecheckrpc.go and convert it to a test 2019-01-07 11:47:49 -08:00
LICENSE vendor: update vendored packages (#791) 2017-04-17 14:13:00 -07:00
mutex17.go vendor: update vendored packages (#791) 2017-04-17 14:13:00 -07:00
mutex.go vendor: update vendored packages (#791) 2017-04-17 14:13:00 -07:00
profile.go vendor: update vendored packages (#791) 2017-04-17 14:13:00 -07:00
README.md tests: fix typecheckrpc.go and convert it to a test 2019-01-07 11:47:49 -08:00
trace16.go vendor: update vendored packages (#791) 2017-04-17 14:13:00 -07:00
trace.go vendor: update vendored packages (#791) 2017-04-17 14:13:00 -07:00

profile

Simple profiling support package for Go

Build Status GoDoc

installation

go get github.com/pkg/profile

usage

Enabling profiling in your application is as simple as one line at the top of your main function

import "github.com/pkg/profile"

func main() {
    defer profile.Start().Stop()
    ...
}

options

What to profile is controlled by config value passed to profile.Start. By default CPU profiling is enabled.

import "github.com/pkg/profile"

func main() {
    // p.Stop() must be called before the program exits to
    // ensure profiling information is written to disk.
    p := profile.Start(profile.MemProfile, profile.ProfilePath("."), profile.NoShutdownHook)
    ...
}

Several convenience package level values are provided for cpu, memory, and block (contention) profiling.

For more complex options, consult the documentation.

contributing

We welcome pull requests, bug fixes and issue reports.

Before proposing a change, please discuss it first by raising an issue.