strace

package
v0.0.0-...-ab92e14 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: GPL-3.0 Imports: 12 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExcludedSyscalls = getExcludedSyscalls()

Export excluded syscalls as used by this package and multiple testsuites

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