strace

package
v0.0.0-...-1f06296 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(extraStraceOpts []string, traceeCmd ...string) (*exec.Cmd, error)

Command returns how to run strace in the users context with the right set of excluded system calls.

func TraceExecCommand

func TraceExecCommand(straceLogPath string, origCmd ...string) (*exec.Cmd, error)

TraceExecCommand returns an exec.Cmd suitable for tracking timings of execve{,at}() calls

Types

type ExeRuntime

type ExeRuntime struct {
	Exe string
	// FIXME: move to time.Duration
	TotalSec float64
}

ExeRuntime is the runtime of an individual executable

type ExecveTiming

type ExecveTiming struct {
	TotalTime float64
	// contains filtered or unexported fields
}

ExecveTiming measures the execve calls timings under strace. This is useful for performance analysis. It keeps the N slowest samples.

func NewExecveTiming

func NewExecveTiming(nSlowestSamples int) *ExecveTiming

NewExecveTiming returns a new ExecveTiming struct that keeps the given amount of the slowest exec samples.

func TraceExecveTimings

func TraceExecveTimings(straceLog string, nSlowest int) (*ExecveTiming, error)

func (*ExecveTiming) Display

func (stt *ExecveTiming) Display(w io.Writer)

Jump to

Keyboard shortcuts

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