benchmark

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: 21 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommitHash added in v0.4.0

func GetCommitHash() (string, error)

func OverlayFSFullRun

func OverlayFSFullRun(
	ctx context.Context,
	b *testing.B,
	testName string,
	imageDescriptor ImageDescriptor)

func PullImageFromRegistry added in v0.3.0

func PullImageFromRegistry(ctx context.Context, b *testing.B, imageRef string)

func SociFullRun

func SociFullRun(
	ctx context.Context,
	b *testing.B,
	testName string,
	imageDescriptor ImageDescriptor)

func SociRPullPullImage

func SociRPullPullImage(
	ctx context.Context,
	b *testing.B,
	imageRef string,
	indexDigest string)

func StargzFullRun

func StargzFullRun(
	ctx context.Context,
	b *testing.B,
	imageDescriptor ImageDescriptor,
	stargzBinary string)

Types

type ImageDescriptor

type ImageDescriptor struct {
	ShortName       string       `json:"short_name"`
	ImageRef        string       `json:"image_ref"`
	SociIndexDigest string       `json:"soci_index_digest"`
	ReadyLine       string       `json:"ready_line"`
	TimeoutSec      int64        `json:"timeout_sec"`
	ImageOptions    ImageOptions `json:"options"`
}

func GetDefaultWorkloads added in v0.4.0

func GetDefaultWorkloads() []ImageDescriptor

func GetImageList added in v0.5.0

func GetImageList(file string) ([]ImageDescriptor, error)

func GetImageListFromCsv

func GetImageListFromCsv(r io.Reader) ([]ImageDescriptor, error)

func GetImageListFromJSON added in v0.5.0

func GetImageListFromJSON(r io.Reader) ([]ImageDescriptor, error)

func (*ImageDescriptor) ContainerOpts added in v0.5.0

ContainerOpts creates a set of NewContainerOpts from an ImageDescriptor and a containerd.Image The options can be used directly when launching a container

func (*ImageDescriptor) Timeout added in v0.5.0

func (i *ImageDescriptor) Timeout() time.Duration

type ImageOptions added in v0.5.0

type ImageOptions struct {
	// Net indicicates the container's network mode. If set to "host" then the container will have host networking, otherwise no networking.
	Net string `json:"net"`
	// Mounts are any mounts needed by the container
	Mounts []runtimespec.Mount `json:"mounts"`
	// Gpu is whether the container needs GPUs. If true, all GPUs are mounted in the container
	Gpu bool `json:"gpu"`
	// Env is any environment variables needed by the containerd
	Env []string `json:"env"`
	// ShmSize is the size of /dev/shm to be used inside the container
	ShmSize int64 `json:"shm_size"`
}

ImageOptions contains image-specific options needed to run the tests

type SociContainerdProcess

type SociContainerdProcess struct {
	*framework.ContainerdProcess
}

func (*SociContainerdProcess) CreateSociContainer

func (proc *SociContainerdProcess) CreateSociContainer(
	ctx context.Context,
	image containerd.Image,
	imageDescriptor ImageDescriptor) (containerd.Container, func(), error)

func (*SociContainerdProcess) SociRPullImageFromRegistry added in v0.3.0

func (proc *SociContainerdProcess) SociRPullImageFromRegistry(
	ctx context.Context,
	imageRef string,
	sociIndexDigest string) (containerd.Image, error)

type SociProcess

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

func StartSoci

func StartSoci(
	sociBinary string,
	sociAddress string,
	sociRoot string,
	containerdAddress string,
	configFile string,
	outputDir string) (*SociProcess, error)

func (*SociProcess) StopProcess

func (proc *SociProcess) StopProcess()

type StargzContainerdProcess

type StargzContainerdProcess struct {
	*framework.ContainerdProcess
}

func (*StargzContainerdProcess) StargzRpullImageFromRegistry added in v0.3.0

func (proc *StargzContainerdProcess) StargzRpullImageFromRegistry(
	ctx context.Context,
	imageRef string) (containerd.Image, error)

type StargzProcess

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

func StartStargz

func StartStargz(
	stargzBinary string,
	stargzAddress string,
	stargzConfig string,
	stargzRoot string,
	outputDir string) (*StargzProcess, error)

func (*StargzProcess) StopProcess

func (proc *StargzProcess) StopProcess()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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