A simple non-recursive DNS server written in Go.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Brett Langdon 24712f3ebd Add "profile" from "git://github.com/pkg/profile@v1.0.0" 10 years ago
..
AUTHORS Add "profile" from "git://github.com/pkg/profile@v1.0.0" 10 years ago
LICENSE Add "profile" from "git://github.com/pkg/profile@v1.0.0" 10 years ago
README.md Add "profile" from "git://github.com/pkg/profile@v1.0.0" 10 years ago
example_test.go Add "profile" from "git://github.com/pkg/profile@v1.0.0" 10 years ago
profile.go Add "profile" from "git://github.com/pkg/profile@v1.0.0" 10 years ago
profile_test.go Add "profile" from "git://github.com/pkg/profile@v1.0.0" 10 years ago
wercker.yml Add "profile" from "git://github.com/pkg/profile@v1.0.0" 10 years ago

README.md

profile

Simple profiling support package for Go

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.