benchmarks

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// benchmark IDs that must be handled as values from hosts.
	CPUCores    = 2
	RamSize     = 3
	StorageSize = 4
	NetworkIn   = 5
	NetworkOut  = 6
	GPUCount    = 7
	GPUMem      = 8

	BenchIDEnvParamName = "SONM_BENCHMARK_ID"
	CPUCountBenchParam  = "SONM_CPU_COUNT"
	GPUVendorParam      = "SONM_GPU_TYPE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BenchList

type BenchList interface {
	ByID() []*pb.Benchmark
	MapByDeviceType() map[pb.DeviceType][]*pb.Benchmark
	MapByCode() map[string]*pb.Benchmark
}

func NewBenchmarksList

func NewBenchmarksList(ctx context.Context, cfg Config) (BenchList, error)

NewBenchmarksList returns benchmark list from external storage.

type Config

type Config struct {
	URL string `yaml:"url"`
}

type ContainerBenchmarkResultsJSON

type ContainerBenchmarkResultsJSON struct {
	Results map[string]*ResultJSON `json:"results"`
}

ContainerBenchmarkResultsJSON describes JSON structure which container must return as result of one or many benchmarks. Maps benchmark code to result struct

type Loader

type Loader interface {
	Load(ctx context.Context) (Mapping, error)
}

func NewLoader

func NewLoader(uri string) Loader

type Mapping

type Mapping interface {
	DeviceType(id int) sonm.DeviceType
	SplittingAlgorithm(id int) sonm.SplittingAlgorithm
}

type ResultJSON

type ResultJSON struct {
	Result   uint64 `json:"result"`
	DeviceID string `json:"device_id"`
}

ResultJSON describes results of single benchmark.

Jump to

Keyboard shortcuts

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