framework

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 26 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRemoteOpts

func GetRemoteOpts(ctx context.Context, platform string) []containerd.RemoteOpt

func GetResolver added in v0.3.0

func GetResolver(ctx context.Context, imageRef string) remotes.Resolver

func GetTestContext

func GetTestContext(logFile io.Writer) (context.Context, context.CancelFunc)

Types

type BenchmarkFramework

type BenchmarkFramework struct {
	OutputDir string                `json:"-"`
	CommitID  string                `json:"commit"`
	Drivers   []BenchmarkTestDriver `json:"benchmarkTests"`
}

func (*BenchmarkFramework) Run

func (frame *BenchmarkFramework) Run(ctx context.Context)

type BenchmarkTestDriver

type BenchmarkTestDriver struct {
	TestName       string             `json:"testName"`
	NumberOfTests  int                `json:"numberOfTests"`
	BeforeFunction func()             `json:"-"`
	TestFunction   func(*testing.B)   `json:"-"`
	AfterFunction  func() error       `json:"-"`
	TestsRun       int                `json:"-"`
	FullRunStats   BenchmarkTestStats `json:"fullRunStats"`
	PullStats      BenchmarkTestStats `json:"pullStats"`
	UnpackStats    BenchmarkTestStats `json:"unpackStats"`
	LazyTaskStats  BenchmarkTestStats `json:"lazyTaskStats"`
	LocalTaskStats BenchmarkTestStats `json:"localTaskStats"`
}

type BenchmarkTestStats added in v0.4.0

type BenchmarkTestStats struct {
	BenchmarkTimes []float64 `json:"BenchmarkTimes"`
	StdDev         float64   `json:"stdDev"`
	Mean           float64   `json:"mean"`
	Min            float64   `json:"min"`
	Pct25          float64   `json:"pct25"`
	Pct50          float64   `json:"pct50"`
	Pct75          float64   `json:"pct75"`
	Pct90          float64   `json:"pct90"`
	Max            float64   `json:"max"`
}

type ContainerdProcess

type ContainerdProcess struct {
	Client *containerd.Client
	// contains filtered or unexported fields
}

func StartContainerd

func StartContainerd(
	containerdAddress string,
	containerdRoot string,
	containerdState string,
	containerdConfig string,
	containerdOutput string) (*ContainerdProcess, error)

func (*ContainerdProcess) CreateContainer

func (proc *ContainerdProcess) CreateContainer(
	ctx context.Context,
	opts ...containerd.NewContainerOpts) (containerd.Container, func(), error)

func (*ContainerdProcess) CreateTask

func (proc *ContainerdProcess) CreateTask(
	ctx context.Context,
	container containerd.Container) (*TaskDetails, func(), error)

func (*ContainerdProcess) DeleteImage

func (proc *ContainerdProcess) DeleteImage(ctx context.Context, imageRef string) error

func (*ContainerdProcess) PullImage

func (proc *ContainerdProcess) PullImage(
	ctx context.Context,
	imageRef string,
	platform string) (containerd.Image, error)

func (*ContainerdProcess) PullImageFromRegistry added in v0.3.0

func (proc *ContainerdProcess) PullImageFromRegistry(
	ctx context.Context,
	imageRef string,
	platform string) (containerd.Image, error)

func (*ContainerdProcess) RunContainerTaskForReadyLine

func (proc *ContainerdProcess) RunContainerTaskForReadyLine(
	ctx context.Context,
	taskDetails *TaskDetails,
	readyLine string,
	timeout time.Duration) (func(), error)

func (*ContainerdProcess) StopProcess

func (proc *ContainerdProcess) StopProcess()

type TaskDetails

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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