exec

package
v0.5.10 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseArgs

func ParseArgs(info *Info, args []string)

Types

type Command

type Command struct {
	// contains filtered or unexported fields
}

func (*Command) Execute

func (cmd *Command) Execute(ctx context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus

func (*Command) Name

func (*Command) Name() string

func (*Command) SetFlags

func (cmd *Command) SetFlags(f *flag.FlagSet)

func (*Command) Synopsis

func (*Command) Synopsis() string

func (*Command) Usage

func (*Command) Usage() string

type Info

type Info struct {
	Command     string
	PackageName string
	Args        []string

	Usage

	Output     string
	OutputSize memory.Bytes

	Inputs     []Input
	InputsSize memory.Bytes

	Start  time.Time
	Finish time.Time

	UserTime   time.Duration
	SystemTime time.Duration
}

type Input added in v0.5.10

type Input struct {
	Path string
	Size memory.Bytes
}

type Usage added in v0.5.9

type Usage struct {
	HasUsage bool

	MaximumResidentSetSize     memory.Bytes // maxrss
	IntegralSharedMemorySize   memory.Bytes // ixrss
	IntegralUnsharedDataSize   memory.Bytes // idrss
	IntegralUnsharedStackSize  memory.Bytes // isrss
	PageReclaims               int64        // minflt, soft page faults
	PageFaults                 int64        // majflt, hard page faults
	Swaps                      int64        // nswap
	BlockInputOperations       int64        // inblock
	BlockOutputOperations      int64        // oublock
	IPCMessagesSent            int64        // msgsnd
	IPCMessagesReceived        int64        // msgrcv
	SignalsReceived            int64        // nsignals
	VoluntaryContextSwitches   int64        // nvcsw
	InvoluntaryContextSwitches int64        // nivcsw
}

func TryGetUsage added in v0.5.9

func TryGetUsage(state *os.ProcessState) Usage

Jump to

Keyboard shortcuts

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