benchmark

package
v0.0.0-...-242fe8a Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FileAccessDir = outputDir + "file_access_logs/"
)

Functions

func CvmfsFullRun

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

func GetCommitHash

func GetCommitHash() (string, error)

func OverlayFSFullRun

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

func ParseFileAccesses

func ParseFileAccesses(imageName string) error

func PullImageFromRegistry

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,
	testName string,
	imageDescriptor ImageDescriptor,
)

func WriteDefaultConfig

func WriteDefaultConfig()

Types

type BaseOperation

type BaseOperation struct {
	Level     string    `json:"level"`
	Msg       string    `json:"msg"`
	Operation string    `json:"operation"`
	Path      string    `json:"path"`
	Time      time.Time `json:"time"`
}

type CvmfsContainerdProcess

type CvmfsContainerdProcess struct {
	*framework.ContainerdProcess
}

func (*CvmfsContainerdProcess) CvmfsPullImageFromRegistry

func (proc *CvmfsContainerdProcess) CvmfsPullImageFromRegistry(
	ctx context.Context,
	imageRef string) (containerd.Image, error)

type CvmfsProcess

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

func GetCvmfsProcess

func GetCvmfsProcess(cvmfsBinary string) (*CvmfsProcess, error)

func StartCvmfs

func StartCvmfs(
	cvmfsBinary string,
	cvmfsAddress string,
	cvmfsConfig string,
	cvmfsRoot string,
	outputDir string) (*CvmfsProcess, error)

func (*CvmfsProcess) StopProcess

func (proc *CvmfsProcess) StopProcess()

type FileAccessPatterns

type FileAccessPatterns struct {
	ImageName           string         `json:"ImageName"`
	ContainerStartTime  time.Time      `json:"containerStartTime"`
	TotalOperationCount map[string]int `json:"TotalOperationCounts"`
	Operations          []Operation    `json:"operations"`
}

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"`
	Command         string       `json:"command"`
	TimeoutSec      int64        `json:"timeout_sec"`
	ImageOptions    ImageOptions `json:"options"`
	Mount           mount.Mount  `json:"mount"`
}

func GetDefaultWorkloads

func GetDefaultWorkloads() []ImageDescriptor

func GetImageList

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

func GetImageListFromJSON

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

func (*ImageDescriptor) ContainerOpts

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

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

type ImageOptions

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 Operation

type Operation struct {
	Operation                 string `json:"operation"`
	Path                      string `json:"path"`
	FirstAccessTimeAfterStart string `json:"firstAccessTimeAfterStart"`
	Count                     int    `json:"count"`
}

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

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

type SociLog

type SociLog struct {
	Msg string `json:"msg"`
}

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

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