measure

package
v2.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecuteOptionFunc

type ExecuteOptionFunc func(*ExecutorTimeMeasurement)

ExecuteOptionFunc is a function to set executor options

type ExecutorTimeMeasurement

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

ExecutorTimeMeasurement is a middleware that measure the execution time of a command

func NewExecutorTimeMeasurement

func NewExecutorTimeMeasurement(executor execute.Executor, options ...ExecuteOptionFunc) *ExecutorTimeMeasurement

NewExecutorTimeMeasurement returns a new ExecutorTimeMeasurement

func (*ExecutorTimeMeasurement) Duration

func (e *ExecutorTimeMeasurement) Duration() time.Duration

Duration returns the duration of the command

func (*ExecutorTimeMeasurement) Execute

func (e *ExecutorTimeMeasurement) Execute(ctx context.Context) error

Execute takes a command and args and runs it, streaming output to stdout

Jump to

Keyboard shortcuts

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