config

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DownloaderDfget is the dfget downloader.
	DownloaderDfget = "dfget"

	// DownloaderProxy is the proxy downloader.
	DownloaderProxy = "proxy"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// KubeConfig is the path to the kubeconfig file.
	KubeConfig string `yaml:"kubeconfig,omitempty" mapstructure:"kubeconfig,omitempty"`

	// Timeout specifies the timeout for benchmarking
	Timeout time.Duration `yaml:"timeout,omitempty" mapstructure:"timeout,omitempty"`

	// LogLevel is the level with to log for this config
	LogLevel string `yaml:"log_level,omitempty" mapstructure:"log_level,omitempty"`

	// Dragonfly is the configuration for benchmarking dragonfly.
	Dragonfly DragonflyConfig `yaml:"dragonfly,omitempty" mapstructure:"dragonfly,omitempty"`

	// Nydus is the configuration for benchmarking nydus.
	Nydus NydusConfig `yaml:"nydus,omitempty" mapstructure:"nydus,omitempty"`
}

Config is the root configuration for dfbench.

func New

func New() *Config

New bench configuration.

func (*Config) Validate

func (c *Config) Validate() error

Validate the configuration.

type DragonflyConfig

type DragonflyConfig struct {
	// Namespace is the namespace to use for the benchmark.
	Namespace string `yaml:"namespace,omitempty" mapstructure:"namespace,omitempty"`

	// Number is the number of times to run the benchmark.
	Number uint32 `yaml:"number,omitempty" mapstructure:"number,omitempty"`

	// Downloader is the downloader to use for the benchmark [dfget, proxy], default is dfget.
	Downloader string `yaml:"downloader,omitempty" mapstructure:"downloader,omitempty"`

	// FileSizeLevel is the file size level to use for the benchmark [nano, micro, small, medium, large, xlarge, xxlarge], default is "" to run all levels.
	FileSizeLevel string `yaml:"file_size_level,omitempty" mapstructure:"file_size_level,omitempty"`
}

DragonflyConfig is the configuration for benchmarking dragonfly.

type NydusConfig

type NydusConfig struct {
	// Namespace is the namespace to use for the benchmark.
	Namespace string `yaml:"namespace,omitempty" mapstructure:"namespace,omitempty"`

	// Number is the number of times to run the benchmark.
	Number uint32 `yaml:"number,omitempty" mapstructure:"number,omitempty"`
}

NydusConfig is the configuration for benchmarking nydus.

Jump to

Keyboard shortcuts

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