benchmark

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GBtoMB = 1000

	DefaultTimeLimit = 24 * time.Hour
)
View Source
const DefaultHPLImage = "registry-1.deepsquare.run#library/hpc-benchmarks:23.5"
View Source
const DefaultIORImage = "registry-1.deepsquare.run#library/ior-benchmarks:latest"
View Source
const DefaultOSUImage = "registry-1.deepsquare.run#library/osu-benchmarks:latest"
View Source
const DefaultSpeedTestImage = "registry-1.docker.io#gists/speedtest-cli:1.2.0"

Variables

View Source
var DefaultStore = NewStore()

Functions

func NewHPLPhase1Handler

func NewHPLPhase1Handler(
	next func(optimal *hpl.Result, err error) error,
) http.HandlerFunc

func NewIORHandler

func NewIORHandler(
	next func(avgr *ior.Result, avgw *ior.Result, err error) error,
) http.HandlerFunc

func NewMachineHandler

func NewMachineHandler(
	next func(res *MachineSpec, err error) error,
) http.HandlerFunc

func NewOSUHandler

func NewOSUHandler(
	next func(res float64, err error) error,
) http.HandlerFunc

func NewSpeedTestHandler

func NewSpeedTestHandler(
	next func(res *speedtest.Result, err error) error,
) http.HandlerFunc

Types

type Benchmark

type Benchmark scheduler.JobDefinition

func GenerateIORBenchmark

func GenerateIORBenchmark(
	opts ...Option,
) (*Benchmark, error)

func GenerateOSUBenchmark

func GenerateOSUBenchmark(
	opts ...Option,
) (*Benchmark, error)

func GeneratePhase1HPLBenchmark

func GeneratePhase1HPLBenchmark(
	opts ...Option,
) (*Benchmark, error)

func GenerateSpeedTestBenchmark

func GenerateSpeedTestBenchmark(
	opts ...Option,
) (*Benchmark, error)

type Data

type Data struct {
	// UploadBandwidth is in bps
	UploadBandwidth uint64
	// DownloadBandwidth is in bps
	DownloadBandwidth uint64
	GFLOPS            float64
	// P2PBidirectionalBandwidth is in MB/s
	P2PBidirectionalBandwidth float64
	// P2PBidirectionalBandwidth is in us
	AllToAllCollectiveLatency float64
	// P2PLatency is in us
	P2PLatency             float64
	ScratchAvgRead         *ior.Result
	ScratchAvgWrite        *ior.Result
	SharedWorldTmpAvgRead  *ior.Result
	SharedWorldTmpAvgWrite *ior.Result
	SharedTmpAvgRead       *ior.Result
	SharedTmpAvgWrite      *ior.Result
	DiskWorldTmpAvgRead    *ior.Result
	DiskWorldTmpAvgWrite   *ior.Result
	DiskTmpAvgRead         *ior.Result
	DiskTmpAvgWrite        *ior.Result

	MachineSpec *MachineSpec
}

type Launcher

type Launcher interface {
	// Cancel cancels all running benchmark
	Cancel(ctx context.Context, name string) error
	// Get the generated job name for benchmarks.
	GetJobName(name string) string
	Launch(
		ctx context.Context,
		name string,
		benchmark *Benchmark,
	) error
}

func NewLauncher

func NewLauncher(
	user string,
	supervisorPublicAddress string,
	scheduler scheduler.Scheduler,
	opts ...LauncherOption,
) Launcher

type LauncherOption

type LauncherOption func(*launcher)

func WithNoWait

func WithNoWait() LauncherOption

func WithTimeLimit

func WithTimeLimit(timeLimit time.Duration) LauncherOption

type MachineSpec

type MachineSpec struct {
	MicroArch string `json:"microarch"`
	OS        string `json:"os"`
	CPU       string `json:"cpu"`
	Arch      string `json:"arch"`
	GPU       string `json:"gpu"`
}

type Option

type Option func(*options)

func WithAdditionalEnv added in v0.14.5

func WithAdditionalEnv(key string, value string) Option

func WithClusterSpecs

func WithClusterSpecs(
	nodes uint64,
	cpusPerNode uint64,
	gpusPerNode uint64,
	memPerNode uint64,
) Option

func WithImage

func WithImage(
	image string,
) Option

func WithSupervisorPublicAddress

func WithSupervisorPublicAddress(supervisorPublicAddress string) Option

func WithTrace

func WithTrace() Option

func WithUCX

func WithUCX(affinity string, transport string) Option

type Store

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

Store is a simple store with hard-coded keys to store benchmark results.

func NewStore

func NewStore() *Store

func (*Store) Dump

func (s *Store) Dump() Data

func (*Store) IsComplete

func (s *Store) IsComplete() bool

func (*Store) SetAllToAllCollectiveLatency

func (s *Store) SetAllToAllCollectiveLatency(latency float64)

func (*Store) SetDiskTmpResult

func (s *Store) SetDiskTmpResult(avgr, avgw *ior.Result)

func (*Store) SetDiskWorldTmpResult

func (s *Store) SetDiskWorldTmpResult(avgr, avgw *ior.Result)

func (*Store) SetDownloadBandwidth

func (s *Store) SetDownloadBandwidth(download uint64)

func (*Store) SetFailure

func (s *Store) SetFailure(err error)

func (*Store) SetGFLOPS

func (s *Store) SetGFLOPS(gflops float64)

func (*Store) SetMachineSpec

func (s *Store) SetMachineSpec(spec *MachineSpec)

func (*Store) SetP2PBidirectionalBandwidth

func (s *Store) SetP2PBidirectionalBandwidth(bandwidth float64)

func (*Store) SetP2PLatency

func (s *Store) SetP2PLatency(latency float64)

func (*Store) SetScratchResult

func (s *Store) SetScratchResult(avgr, avgw *ior.Result)

func (*Store) SetSharedTmpResult

func (s *Store) SetSharedTmpResult(avgr, avgw *ior.Result)

func (*Store) SetSharedWorldTmpResult

func (s *Store) SetSharedWorldTmpResult(avgr, avgw *ior.Result)

func (*Store) SetUploadBandwidth

func (s *Store) SetUploadBandwidth(upload uint64)

func (*Store) WaitForCompletion

func (s *Store) WaitForCompletion(ctx context.Context) (done chan struct{}, errc chan error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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