sigprof

package module
v0.0.0-...-7750eda Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2016 License: BSD-3-Clause Imports: 10 Imported by: 0

README

sigprof

Golang package for inspecting running processes. Similar to net/http/pprof but using USR1 and USR2 signals instead of HTTP server routes.

Usage

Link the package:

import _ "github.com/tam7t/sigprof"

Send the USR1 or USR2 signal to inspect the process.

kill -usr1 <golang process pid>

The default USR1 profile is goroutine. By default, sigprof will save results to timestamped files.

go tool pprof profile-<timestamp>.prof

Configuration

sigprof loads its configuration from the following environment variables.

  • USR1_PROF - Profile executed on the USR1 signal. Default: goroutine
  • USR2_PROF - Profile executed on the USR2 signal. Default: heap
  • SIG_PROF_OUT - Specify the output location, either file, stderr, or stdout. Default: file.

Documentation

Overview

Package sigprof provides signal-triggered profiling.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL