Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pkg/profile
Simple profiling for Go
https://github.com/pkg/profile
Last synced: about 1 month ago
JSON representation
Simple profiling for Go
- Host: GitHub
- URL: https://github.com/pkg/profile
- Owner: pkg
- License: bsd-2-clause
- Created: 2014-10-22T01:35:18.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-10-20T20:16:29.000Z (over 1 year ago)
- Last Synced: 2024-02-01T00:16:36.638Z (4 months ago)
- Language: Go
- Size: 64.5 KB
- Stars: 1,938
- Watchers: 39
- Forks: 166
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-go - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- awesome-go - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- awesome-go-extra - profile - 10-22T01:35:18Z|2021-11-02T20:31:47Z| (Performance / HTTP Clients)
- awesome-go-cn - profile
- awesome-go-zh - profile
- awesome-go - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- go-awesome - pkg/profile
- awesome-go - profile - Simple profiling support package for Go. Stars:`2.0K`. (Performance / HTTP Clients)
- awesome-go-cn - profile
- awesome-go-projects - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- awesome-go - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- awesome-go - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- awesome-go - profile - | - | - | (Utilities / HTTP Clients)
- awesome-go-with-framework - profile - Simple profiling support package for Go. (Utilities / HTTP Clients)
- awesome-go - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- go-awesome-cn-star - profile
- zero-alloc-awesome-go - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- awesome-go-cn - profile
- awesome-go-stars - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- awesome-go - profile - Simple profiling support package for Go. (Utilities / HTTP Clients)
- awesome-go. - profile - Simple profiling support package for Go. (Utilities / Advanced Console UIs)
- awesome-go - profile - Simple profiling support package for Go. (Utilities / <span id="高级控制台用户界面-advanced-console-uis">高级控制台用户界面 Advanced Console UIs</span>)
- awesome-go-cn - profile - 一个简单的性能分析软件包 (实用工具 / 高级控制台界面)
- awesome-star - pkg/profile
- awesome-go-with-stars - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- awesome-go - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- go-awesome - pkg/profile
- repo-1316-awesome-go-cn - profile
- repo-1211-awesome-go-cn - profile
- awesome-Char - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- awesome-reader - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- awesome-go - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- Go-awesome - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- awesome-go - profile - Simple profiling support package for Go. (Utilities / Advanced Console UIs)
- awesome-go - profile - Simple profiling support package for Go. (Utilities / Advanced Console UIs)
- awesome-go-zh - profile
- awesome-go - profile - 一個簡單的性能分析軟件包 (實用工具 / 高級控制台界面)
- awesome-go-handwritten - profile - Simple profiling support package for Go. (Utilities / HTTP Clients)
- awesome-go - profile - Simple profiling support package for Go. - :arrow_down:213 - :star:323 (Utilities / HTTP Clients)
- awesome-stars - pkg/profile - `★1968` Simple profiling for Go (Go)
- go-awesome - package/profile
- awesome-go2 - profile - Simple profiling support package for Go. (Utilities / Advanced Console UIs)
- awesome-go - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- awesome-go - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- awesome-go - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- awesome-go-cn - profile
- awesome-go - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- awesome-go - profile - Simple profiling support package for Go. (Performance / HTTP Clients)
- awesome-go-cn - profile
- awesome-go - profile - Simple profiling for Go - ★ 827 (Utilities)
README
profile
=======Simple profiling support package for Go
[![Build Status](https://travis-ci.org/pkg/profile.svg?branch=master)](https://travis-ci.org/pkg/profile) [![GoDoc](http://godoc.org/github.com/pkg/profile?status.svg)](http://godoc.org/github.com/pkg/profile)
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
```go
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.```go
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)
...
// You can enable different kinds of memory profiling, either Heap or Allocs where Heap
// profiling is the default with profile.MemProfile.
p := profile.Start(profile.MemProfileAllocs, 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](http://godoc.org/github.com/pkg/profile).
contributing
------------We welcome pull requests, bug fixes and issue reports.
Before proposing a change, please discuss it first by raising an issue.