autopprof

Pprof made easy at development time for Go

  • 所有者: rakyll/autopprof
  • 平台:
  • 许可证: Apache License 2.0
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

autopprof

GoDoc

Pprof made easy at development time.

Guide

Add autopprof.Capture to your main function.

import "github.com/rakyll/autopprof"

autopprof.Capture(autopprof.CPUProfile{
    Duration: 30 * time.Second,
})

Run your program and send SIGQUIT to the process
(or CTRL+\ on Mac).

Profile capturing will start. Pprof UI will be started
once capture is completed.

See godoc for other profile types.

Why autopprof?

autopprof is a easy-to-setup pprof profile data collection library
for development time.
It highly depends on the standard library packages such as
runtime/pprof and the existing
tools such as go tool pprof.

Collecting and visualizing profiling data from Go programs is a
multi-step process. First, you need to collect and write the collected
data to a file. Then you should use the go tool pprof tool to analyze
and visualize.

autopprof makes it easier to collect and start the pprof UI with a
one-line configuration. It collects profiles once the process is triggered
with a SIGQUIT and starts the pprof UI with the collected data. Since it
does signal handling and starting the browser, it is only recommended
at development-time.

For production cases, please see the
runtime/pprof
and net/http/pprof packages.

主要指标

概览
名称与所有者rakyll/autopprof
主编程语言Go
编程语言Go (语言数: 1)
平台
许可证Apache License 2.0
所有者活动
创建于2018-11-21 23:04:48
推送于2020-10-23 06:00:38
最后一次提交2020-10-23 01:00:37
发布数1
最新版本名称v0.1.0 (发布于 )
第一版名称v0.1.0 (发布于 )
用户参与
星数755
关注者数17
派生数35
提交数19
已启用问题?
问题数6
打开的问题数3
拉请求数2
打开的拉请求数0
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?