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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?