74

GitHub - rakyll/autopprof: Pprof made easy at development time for Go

 5 years ago
source link: https://github.com/rakyll/autopprof
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

autopprof

Pprof made easy at development time.

Guide

Add autopprof.Capture to your main function.

import "github.com/rakyll/autopprof"

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

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

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK