config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultJWT is the default JWT secret used for Engine API authentication.
	DefaultJWT = "5a64f13bfb41a147711492237995b437433bcbec80a7eb2daae11132098d7bae"

	// DefaultDockerNetwork is the default Docker network name.
	DefaultDockerNetwork = "benchmarkoor"

	// DefaultLogLevel is the default logging level.
	DefaultLogLevel = "info"

	// DefaultResultsDir is the default directory for benchmark results.
	DefaultResultsDir = "./results"

	// DefaultPullPolicy is the default image pull policy.
	DefaultPullPolicy = "always"

	// DefaultDropCachesPath is the default path to the Linux drop_caches file.
	DefaultDropCachesPath = "/proc/sys/vm/drop_caches"

	// DefaultCPUSysfsPath is the default sysfs path for CPU frequency control.
	DefaultCPUSysfsPath = "/sys/devices/system/cpu"

	// LogTimestampFormat is the UTC timestamp format for log lines.
	LogTimestampFormat = "2006-01-02T15:04:05.000Z"

	// RollbackStrategyNone disables rollback after tests.
	RollbackStrategyNone = "none"

	// RollbackStrategyRPCDebugSetHead rolls back via eth_blockNumber + debug_setHead.
	RollbackStrategyRPCDebugSetHead = "rpc-debug-setHead"

	// RollbackStrategyContainerRecreate recreates the container between tests.
	// The data volume persists, so the client restarts from the same datadir.
	RollbackStrategyContainerRecreate = "container-recreate"
)
View Source
const DefaultContainerDir = "/data"

DefaultContainerDir is the default container mount path for data directories.

View Source
const DefaultEESTFixturesSubdir = "fixtures/blockchain_tests_engine_x"

DefaultEESTFixturesSubdir is the default subdirectory within the fixtures tarball.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIAuthConfig

type APIAuthConfig struct {
	SessionTTL    string           `yaml:"session_ttl" mapstructure:"session_ttl"`
	AnonymousRead bool             `yaml:"anonymous_read" mapstructure:"anonymous_read"`
	Basic         BasicAuthConfig  `yaml:"basic,omitempty" mapstructure:"basic"`
	GitHub        GitHubAuthConfig `yaml:"github,omitempty" mapstructure:"github"`
}

APIAuthConfig contains authentication settings.

type APIConfig

type APIConfig struct {
	Server   APIServerConfig   `yaml:"server" mapstructure:"server"`
	Auth     APIAuthConfig     `yaml:"auth" mapstructure:"auth"`
	Database APIDatabaseConfig `yaml:"database" mapstructure:"database"`
	Storage  APIStorageConfig  `yaml:"storage,omitempty" mapstructure:"storage"`
}

APIConfig contains all API server configuration.

type APIDatabaseConfig

type APIDatabaseConfig struct {
	Driver   string               `yaml:"driver" mapstructure:"driver"`
	SQLite   SQLiteDatabaseConfig `yaml:"sqlite,omitempty" mapstructure:"sqlite"`
	Postgres PostgresConfig       `yaml:"postgres,omitempty" mapstructure:"postgres"`
}

APIDatabaseConfig contains database connection settings.

type APIS3Config

type APIS3Config struct {
	Enabled         bool                    `yaml:"enabled" mapstructure:"enabled"`
	EndpointURL     string                  `yaml:"endpoint_url,omitempty" mapstructure:"endpoint_url"`
	Region          string                  `yaml:"region,omitempty" mapstructure:"region"`
	Bucket          string                  `yaml:"bucket" mapstructure:"bucket"`
	AccessKeyID     string                  `yaml:"access_key_id,omitempty" mapstructure:"access_key_id"`
	SecretAccessKey string                  `yaml:"secret_access_key,omitempty" mapstructure:"secret_access_key"`
	ForcePathStyle  bool                    `yaml:"force_path_style" mapstructure:"force_path_style"`
	PresignedURLs   APIS3PresignedURLConfig `yaml:"presigned_urls,omitempty" mapstructure:"presigned_urls"`
	DiscoveryPaths  []string                `yaml:"discovery_paths,omitempty" mapstructure:"discovery_paths"`
}

APIS3Config contains S3 settings for presigned URL generation.

type APIS3PresignedURLConfig

type APIS3PresignedURLConfig struct {
	Expiry string `yaml:"expiry,omitempty" mapstructure:"expiry"`
}

APIS3PresignedURLConfig contains presigned URL generation settings.

type APIServerConfig

type APIServerConfig struct {
	Listen      string          `yaml:"listen" mapstructure:"listen"`
	CORSOrigins []string        `yaml:"cors_origins,omitempty" mapstructure:"cors_origins"`
	RateLimit   RateLimitConfig `yaml:"rate_limit,omitempty" mapstructure:"rate_limit"`
}

APIServerConfig contains HTTP server settings.

type APIStorageConfig

type APIStorageConfig struct {
	S3 *APIS3Config `yaml:"s3,omitempty" mapstructure:"s3"`
}

APIStorageConfig contains storage backend settings for serving files.

type BasicAuthConfig

type BasicAuthConfig struct {
	Enabled bool            `yaml:"enabled" mapstructure:"enabled"`
	Users   []BasicAuthUser `yaml:"users,omitempty" mapstructure:"users"`
}

BasicAuthConfig configures username/password authentication.

type BasicAuthUser

type BasicAuthUser struct {
	Username string `yaml:"username" mapstructure:"username"`
	Password string `yaml:"password" mapstructure:"password"`
	Role     string `yaml:"role" mapstructure:"role"`
}

BasicAuthUser defines a basic auth user from config.

type BenchmarkConfig

type BenchmarkConfig struct {
	ResultsDir                      string               `yaml:"results_dir" mapstructure:"results_dir"`
	ResultsOwner                    string               `yaml:"results_owner,omitempty" mapstructure:"results_owner"`
	SkipTestRun                     bool                 `yaml:"skip_test_run" mapstructure:"skip_test_run"`
	SystemResourceCollectionEnabled *bool                `yaml:"system_resource_collection_enabled,omitempty" mapstructure:"system_resource_collection_enabled"`
	GenerateResultsIndex            bool                 `yaml:"generate_results_index" mapstructure:"generate_results_index"`
	GenerateResultsIndexMethod      string               `yaml:"generate_results_index_method,omitempty" mapstructure:"generate_results_index_method"`
	GenerateSuiteStats              bool                 `yaml:"generate_suite_stats" mapstructure:"generate_suite_stats"`
	GenerateSuiteStatsMethod        string               `yaml:"generate_suite_stats_method,omitempty" mapstructure:"generate_suite_stats_method"`
	ResultsUpload                   *ResultsUploadConfig `yaml:"results_upload,omitempty" mapstructure:"results_upload"`
	Tests                           TestsConfig          `yaml:"tests,omitempty" mapstructure:"tests"`
}

BenchmarkConfig contains benchmark-specific settings.

type BlkioConfig

type BlkioConfig struct {
	DeviceReadBps   []ThrottleDevice `yaml:"device_read_bps,omitempty" mapstructure:"device_read_bps" json:"device_read_bps,omitempty"`
	DeviceReadIOps  []ThrottleDevice `yaml:"device_read_iops,omitempty" mapstructure:"device_read_iops" json:"device_read_iops,omitempty"`
	DeviceWriteBps  []ThrottleDevice `yaml:"device_write_bps,omitempty" mapstructure:"device_write_bps" json:"device_write_bps,omitempty"`
	DeviceWriteIOps []ThrottleDevice `yaml:"device_write_iops,omitempty" mapstructure:"device_write_iops" json:"device_write_iops,omitempty"`
}

BlkioConfig configures container block I/O limits.

func (*BlkioConfig) Validate

func (b *BlkioConfig) Validate(prefix string) error

Validate checks the blkio configuration for errors.

type BootstrapFCUConfig

type BootstrapFCUConfig struct {
	Enabled       bool   `yaml:"enabled" mapstructure:"enabled" json:"enabled"`
	MaxRetries    int    `yaml:"max_retries" mapstructure:"max_retries" json:"max_retries"`
	Backoff       string `yaml:"backoff" mapstructure:"backoff" json:"backoff"`
	HeadBlockHash string `yaml:"head_block_hash" mapstructure:"head_block_hash" json:"head_block_hash,omitempty"`
}

BootstrapFCUConfig configures the bootstrap FCU call used to confirm the client is fully synced and ready for test execution.

type ClientConfig

type ClientConfig struct {
	Config   ClientDefaults            `yaml:"config" mapstructure:"config"`
	DataDirs map[string]*DataDirConfig `yaml:"datadirs,omitempty" mapstructure:"datadirs"`
}

ClientConfig contains client configuration settings.

type ClientDefaults

type ClientDefaults struct {
	JWT                          string                         `yaml:"jwt" mapstructure:"jwt"`
	Genesis                      map[string]string              `yaml:"genesis" mapstructure:"genesis"`
	DropMemoryCaches             string                         `yaml:"drop_memory_caches,omitempty" mapstructure:"drop_memory_caches"`
	RollbackStrategy             string                         `yaml:"rollback_strategy,omitempty" mapstructure:"rollback_strategy"`
	ResourceLimits               *ResourceLimits                `yaml:"resource_limits,omitempty" mapstructure:"resource_limits"`
	RetryNewPayloadsSyncingState *RetryNewPayloadsSyncingConfig `yaml:"retry_new_payloads_syncing_state,omitempty" mapstructure:"retry_new_payloads_syncing_state"`
	WaitAfterRPCReady            string                         `yaml:"wait_after_rpc_ready,omitempty" mapstructure:"wait_after_rpc_ready"`
	PostTestRPCCalls             []PostTestRPCCall              `yaml:"post_test_rpc_calls,omitempty" mapstructure:"post_test_rpc_calls"`
	BootstrapFCU                 *BootstrapFCUConfig            `yaml:"bootstrap_fcu,omitempty" mapstructure:"bootstrap_fcu"`
}

ClientDefaults contains default settings for all clients.

type ClientInstance

type ClientInstance struct {
	ID                           string                         `yaml:"id" mapstructure:"id"`
	Client                       string                         `yaml:"client" mapstructure:"client"`
	Image                        string                         `yaml:"image,omitempty" mapstructure:"image"`
	Entrypoint                   []string                       `yaml:"entrypoint,omitempty" mapstructure:"entrypoint"`
	Command                      []string                       `yaml:"command,omitempty" mapstructure:"command"`
	ExtraArgs                    []string                       `yaml:"extra_args,omitempty" mapstructure:"extra_args"`
	PullPolicy                   string                         `yaml:"pull_policy,omitempty" mapstructure:"pull_policy"`
	Restart                      string                         `yaml:"restart,omitempty" mapstructure:"restart"`
	Environment                  map[string]string              `yaml:"environment,omitempty" mapstructure:"environment"`
	Genesis                      string                         `yaml:"genesis,omitempty" mapstructure:"genesis"`
	DataDir                      *DataDirConfig                 `yaml:"datadir,omitempty" mapstructure:"datadir"`
	DropMemoryCaches             string                         `yaml:"drop_memory_caches,omitempty" mapstructure:"drop_memory_caches"`
	RollbackStrategy             string                         `yaml:"rollback_strategy,omitempty" mapstructure:"rollback_strategy"`
	ResourceLimits               *ResourceLimits                `yaml:"resource_limits,omitempty" mapstructure:"resource_limits"`
	RetryNewPayloadsSyncingState *RetryNewPayloadsSyncingConfig `yaml:"retry_new_payloads_syncing_state,omitempty" mapstructure:"retry_new_payloads_syncing_state"`
	WaitAfterRPCReady            string                         `yaml:"wait_after_rpc_ready,omitempty" mapstructure:"wait_after_rpc_ready"`
	PostTestRPCCalls             []PostTestRPCCall              `yaml:"post_test_rpc_calls,omitempty" mapstructure:"post_test_rpc_calls"`
	BootstrapFCU                 *BootstrapFCUConfig            `yaml:"bootstrap_fcu,omitempty" mapstructure:"bootstrap_fcu"`
}

ClientInstance defines a single client instance to benchmark.

type Config

type Config struct {
	Global GlobalConfig `yaml:"global" mapstructure:"global"`
	Runner RunnerConfig `yaml:"runner" mapstructure:"runner"`
	API    *APIConfig   `yaml:"api,omitempty" mapstructure:"api"`
}

Config is the root configuration for benchmarkoor.

func Load

func Load(paths ...string) (*Config, error)

Load reads and parses configuration files from the given paths. When multiple paths are provided, configs are merged in order (later values override earlier). Environment variables can be substituted in config values using ${VAR} or $VAR syntax. Additionally, environment variables with the prefix BENCHMARKOOR_ can override config values. For example, BENCHMARKOOR_GLOBAL_LOG_LEVEL overrides global.log_level.

func (*Config) GetBootstrapFCU

func (c *Config) GetBootstrapFCU(instance *ClientInstance) *BootstrapFCUConfig

GetBootstrapFCU returns the bootstrap FCU config for an instance. Instance-level config takes precedence over global default. Returns nil if not configured at either level.

func (*Config) GetCPUSysfsPath

func (c *Config) GetCPUSysfsPath() string

GetCPUSysfsPath returns the sysfs base path for CPU frequency control. Returns the configured path or the default (/sys/devices/system/cpu).

func (*Config) GetDropCachesPath

func (c *Config) GetDropCachesPath() string

GetDropCachesPath returns the path to the drop_caches file. Returns the configured path or the default (/proc/sys/vm/drop_caches).

func (*Config) GetDropMemoryCaches

func (c *Config) GetDropMemoryCaches(instance *ClientInstance) string

GetDropMemoryCaches returns the drop_memory_caches setting for an instance. Instance-level setting takes precedence over global default. Returns empty string if neither is set (disabled).

func (*Config) GetGenesisURL

func (c *Config) GetGenesisURL(instance *ClientInstance) string

GetGenesisURL returns the genesis URL for a client instance.

func (*Config) GetPostTestRPCCalls

func (c *Config) GetPostTestRPCCalls(instance *ClientInstance) []PostTestRPCCall

GetPostTestRPCCalls returns the post-test RPC calls for an instance. Instance-level config completely replaces the global default. Returns nil if not configured at either level.

func (*Config) GetResourceLimits

func (c *Config) GetResourceLimits(instance *ClientInstance) *ResourceLimits

GetResourceLimits returns the resource limits for an instance. Instance-level limits take precedence over global defaults. Returns nil if no limits are configured.

func (*Config) GetRetryNewPayloadsSyncingState

func (c *Config) GetRetryNewPayloadsSyncingState(instance *ClientInstance) *RetryNewPayloadsSyncingConfig

GetRetryNewPayloadsSyncingState returns the retry config for an instance. Instance-level config takes precedence over global defaults. Returns nil if no config is set.

func (*Config) GetRollbackStrategy

func (c *Config) GetRollbackStrategy(instance *ClientInstance) string

GetRollbackStrategy returns the rollback_strategy setting for an instance. Instance-level setting takes precedence over global default. Returns "rpc-debug-setHead" if neither is set.

func (*Config) GetWaitAfterRPCReady

func (c *Config) GetWaitAfterRPCReady(instance *ClientInstance) time.Duration

GetWaitAfterRPCReady returns the duration to wait after RPC becomes ready. This gives clients time to complete internal initialization (e.g., Erigon's staged sync) before test execution begins. Instance-level config takes precedence over global defaults. Returns 0 if not set.

func (*Config) Validate

func (c *Config) Validate(opts ...ValidateOpts) error

Validate checks the configuration for errors. When opts is provided, datadir validation is scoped to active instances/clients.

func (*Config) ValidateAPI

func (c *Config) ValidateAPI() error

ValidateAPI validates the API configuration if present.

type DataDirConfig

type DataDirConfig struct {
	SourceDir    string `yaml:"source_dir" json:"source_dir" mapstructure:"source_dir"`
	ContainerDir string `yaml:"container_dir,omitempty" json:"container_dir,omitempty" mapstructure:"container_dir"`
	Method       string `yaml:"method,omitempty" json:"method,omitempty" mapstructure:"method"`
}

DataDirConfig configures a pre-populated data directory for a client.

func (*DataDirConfig) Validate

func (d *DataDirConfig) Validate(prefix string) error

Validate checks the datadir configuration for errors.

type DirectoriesConfig

type DirectoriesConfig struct {
	// TmpDataDir is the directory for temporary datadir copies.
	// If empty, uses the system default temp directory.
	TmpDataDir string `yaml:"tmp_datadir,omitempty" mapstructure:"tmp_datadir"`
	// TmpCacheDir is the directory for executor cache (git clones, etc).
	// If empty, uses ~/.cache/benchmarkoor.
	TmpCacheDir string `yaml:"tmp_cachedir,omitempty" mapstructure:"tmp_cachedir"`
}

DirectoriesConfig contains directory path configurations.

type DumpConfig

type DumpConfig struct {
	Enabled  bool   `yaml:"enabled" mapstructure:"enabled" json:"enabled"`
	Filename string `yaml:"filename,omitempty" mapstructure:"filename" json:"filename,omitempty"`
}

DumpConfig configures response dumping for a post-test RPC call.

type EESTFixturesSource

type EESTFixturesSource struct {
	GitHubRepo     string `yaml:"github_repo,omitempty" mapstructure:"github_repo"`
	GitHubRelease  string `yaml:"github_release,omitempty" mapstructure:"github_release"`
	FixturesURL    string `yaml:"fixtures_url,omitempty" mapstructure:"fixtures_url"`
	GenesisURL     string `yaml:"genesis_url,omitempty" mapstructure:"genesis_url"`
	FixturesSubdir string `yaml:"fixtures_subdir,omitempty" mapstructure:"fixtures_subdir"`
	// GitHub Actions artifact support (alternative to releases).
	FixturesArtifactName  string `yaml:"fixtures_artifact_name,omitempty" mapstructure:"fixtures_artifact_name"`
	GenesisArtifactName   string `yaml:"genesis_artifact_name,omitempty" mapstructure:"genesis_artifact_name"`
	FixturesArtifactRunID string `yaml:"fixtures_artifact_run_id,omitempty" mapstructure:"fixtures_artifact_run_id"`
	GenesisArtifactRunID  string `yaml:"genesis_artifact_run_id,omitempty" mapstructure:"genesis_artifact_run_id"`
	// Local directory support (already-extracted fixtures).
	LocalFixturesDir string `yaml:"local_fixtures_dir,omitempty" mapstructure:"local_fixtures_dir"`
	LocalGenesisDir  string `yaml:"local_genesis_dir,omitempty" mapstructure:"local_genesis_dir"`
	// Local tarball support (.tar.gz files).
	LocalFixturesTarball string `yaml:"local_fixtures_tarball,omitempty" mapstructure:"local_fixtures_tarball"`
	LocalGenesisTarball  string `yaml:"local_genesis_tarball,omitempty" mapstructure:"local_genesis_tarball"`
}

EESTFixturesSource defines an EEST fixtures source from GitHub releases, artifacts, or local directories/tarballs.

func (*EESTFixturesSource) UseArtifacts

func (e *EESTFixturesSource) UseArtifacts() bool

UseArtifacts returns true if the source is configured to use GitHub Actions artifacts.

func (*EESTFixturesSource) UseLocalDir

func (e *EESTFixturesSource) UseLocalDir() bool

UseLocalDir returns true if the source is configured to use local directories.

func (*EESTFixturesSource) UseLocalTarball

func (e *EESTFixturesSource) UseLocalTarball() bool

UseLocalTarball returns true if the source is configured to use local tarballs.

type GitHubAuthConfig

type GitHubAuthConfig struct {
	Enabled         bool              `yaml:"enabled" mapstructure:"enabled"`
	ClientID        string            `yaml:"client_id,omitempty" mapstructure:"client_id"`
	ClientSecret    string            `yaml:"client_secret,omitempty" mapstructure:"client_secret"`
	RedirectURL     string            `yaml:"redirect_url,omitempty" mapstructure:"redirect_url"`
	OrgRoleMapping  map[string]string `yaml:"org_role_mapping,omitempty" mapstructure:"org_role_mapping"`
	UserRoleMapping map[string]string `yaml:"user_role_mapping,omitempty" mapstructure:"user_role_mapping"`
}

GitHubAuthConfig configures GitHub OAuth authentication.

type GitSourceV2

type GitSourceV2 struct {
	Repo        string       `yaml:"repo" mapstructure:"repo"`
	Version     string       `yaml:"version" mapstructure:"version"`
	PreRunSteps []string     `yaml:"pre_run_steps,omitempty" mapstructure:"pre_run_steps"`
	Steps       *StepsConfig `yaml:"steps,omitempty" mapstructure:"steps"`
}

GitSourceV2 defines a git repository source for tests with step-based structure.

type GlobalConfig

type GlobalConfig struct {
	LogLevel string `yaml:"log_level" mapstructure:"log_level"`
}

GlobalConfig contains global application settings.

type LocalSourceV2

type LocalSourceV2 struct {
	BaseDir     string       `yaml:"base_dir" mapstructure:"base_dir"`
	PreRunSteps []string     `yaml:"pre_run_steps,omitempty" mapstructure:"pre_run_steps"`
	Steps       *StepsConfig `yaml:"steps,omitempty" mapstructure:"steps"`
}

LocalSourceV2 defines a local directory source for tests with step-based structure.

type MetadataConfig

type MetadataConfig struct {
	Labels map[string]string `yaml:"labels,omitempty" mapstructure:"labels" json:"labels,omitempty"`
}

MetadataConfig contains arbitrary metadata labels for a benchmark run.

type PostTestRPCCall

type PostTestRPCCall struct {
	Method  string     `yaml:"method" mapstructure:"method" json:"method"`
	Params  []any      `yaml:"params" mapstructure:"params" json:"params"`
	Timeout string     `yaml:"timeout,omitempty" mapstructure:"timeout" json:"timeout,omitempty"`
	Dump    DumpConfig `yaml:"dump" mapstructure:"dump" json:"dump,omitempty"`
}

PostTestRPCCall defines an arbitrary RPC call to execute after the test step.

type PostgresConfig

type PostgresConfig struct {
	Host     string `yaml:"host" mapstructure:"host"`
	Port     int    `yaml:"port" mapstructure:"port"`
	User     string `yaml:"user" mapstructure:"user"`
	Password string `yaml:"password" mapstructure:"password"`
	Database string `yaml:"database" mapstructure:"database"`
	SSLMode  string `yaml:"ssl_mode,omitempty" mapstructure:"ssl_mode"`
}

PostgresConfig contains PostgreSQL connection settings.

type RateLimitConfig

type RateLimitConfig struct {
	Enabled       bool          `yaml:"enabled" mapstructure:"enabled"`
	Auth          RateLimitTier `yaml:"auth,omitempty" mapstructure:"auth"`
	Public        RateLimitTier `yaml:"public,omitempty" mapstructure:"public"`
	Authenticated RateLimitTier `yaml:"authenticated,omitempty" mapstructure:"authenticated"`
}

RateLimitConfig configures per-IP rate limiting.

type RateLimitTier

type RateLimitTier struct {
	RequestsPerMinute int `yaml:"requests_per_minute" mapstructure:"requests_per_minute"`
}

RateLimitTier defines request limits for a specific tier.

type ResourceLimits

type ResourceLimits struct {
	CpusetCount   *int         `yaml:"cpuset_count,omitempty" mapstructure:"cpuset_count" json:"cpuset_count,omitempty"`
	Cpuset        []int        `yaml:"cpuset,omitempty" mapstructure:"cpuset" json:"cpuset,omitempty"`
	Memory        string       `yaml:"memory,omitempty" mapstructure:"memory" json:"memory,omitempty"`
	SwapDisabled  bool         `yaml:"swap_disabled,omitempty" mapstructure:"swap_disabled" json:"swap_disabled,omitempty"`
	BlkioConfig   *BlkioConfig `yaml:"blkio_config,omitempty" mapstructure:"blkio_config" json:"blkio_config,omitempty"`
	CPUFreq       string       `yaml:"cpu_freq,omitempty" mapstructure:"cpu_freq" json:"cpu_freq,omitempty"`
	CPUTurboBoost *bool        `yaml:"cpu_turboboost,omitempty" mapstructure:"cpu_turboboost" json:"cpu_turboboost,omitempty"`
	CPUGovernor   string       `yaml:"cpu_freq_governor,omitempty" mapstructure:"cpu_freq_governor" json:"cpu_freq_governor,omitempty"`
}

ResourceLimits configures container resource constraints.

func (*ResourceLimits) Validate

func (r *ResourceLimits) Validate(prefix string) error

Validate checks the resource limits configuration for errors.

type ResultsUploadConfig

type ResultsUploadConfig struct {
	S3 *S3UploadConfig `yaml:"s3,omitempty" mapstructure:"s3"`
}

ResultsUploadConfig contains configuration for uploading results.

type RetryNewPayloadsSyncingConfig

type RetryNewPayloadsSyncingConfig struct {
	Enabled    bool   `yaml:"enabled" mapstructure:"enabled" json:"enabled"`
	MaxRetries int    `yaml:"max_retries" mapstructure:"max_retries" json:"max_retries"`
	Backoff    string `yaml:"backoff" mapstructure:"backoff" json:"backoff"`
}

RetryNewPayloadsSyncingConfig configures retry behavior when engine_newPayload returns SYNCING.

type RunnerConfig

type RunnerConfig struct {
	ClientLogsToStdout bool              `yaml:"client_logs_to_stdout" mapstructure:"client_logs_to_stdout"`
	DockerNetwork      string            `yaml:"docker_network" mapstructure:"docker_network"`
	CleanupOnStart     bool              `yaml:"cleanup_on_start" mapstructure:"cleanup_on_start"`
	Directories        DirectoriesConfig `yaml:"directories,omitempty" mapstructure:"directories"`
	DropCachesPath     string            `yaml:"drop_caches_path,omitempty" mapstructure:"drop_caches_path"`
	CPUSysfsPath       string            `yaml:"cpu_sysfs_path,omitempty" mapstructure:"cpu_sysfs_path"`
	GitHubToken        string            `yaml:"github_token,omitempty" mapstructure:"github_token"`
	Metadata           MetadataConfig    `yaml:"metadata,omitempty" mapstructure:"metadata"`
	Benchmark          BenchmarkConfig   `yaml:"benchmark" mapstructure:"benchmark"`
	Client             ClientConfig      `yaml:"client" mapstructure:"client"`
	Instances          []ClientInstance  `yaml:"instances" mapstructure:"instances"`
}

RunnerConfig contains all run-specific configuration settings.

type S3UploadConfig

type S3UploadConfig struct {
	Enabled         bool   `yaml:"enabled" mapstructure:"enabled"`
	EndpointURL     string `yaml:"endpoint_url,omitempty" mapstructure:"endpoint_url"`
	Region          string `yaml:"region,omitempty" mapstructure:"region"`
	Bucket          string `yaml:"bucket" mapstructure:"bucket"`
	AccessKeyID     string `yaml:"access_key_id,omitempty" mapstructure:"access_key_id"`
	SecretAccessKey string `yaml:"secret_access_key,omitempty" mapstructure:"secret_access_key"`
	Prefix          string `yaml:"prefix,omitempty" mapstructure:"prefix"`
	StorageClass    string `yaml:"storage_class,omitempty" mapstructure:"storage_class"`
	ACL             string `yaml:"acl,omitempty" mapstructure:"acl"`
	ForcePathStyle  bool   `yaml:"force_path_style" mapstructure:"force_path_style"`
	ParallelUploads int    `yaml:"parallel_uploads,omitempty" mapstructure:"parallel_uploads"`
}

S3UploadConfig contains S3-compatible storage upload settings.

type SQLiteDatabaseConfig

type SQLiteDatabaseConfig struct {
	Path string `yaml:"path" mapstructure:"path"`
}

SQLiteDatabaseConfig contains SQLite-specific settings.

type SourceConfig

type SourceConfig struct {
	// New unified source options.
	Git          *GitSourceV2        `yaml:"git,omitempty" mapstructure:"git"`
	Local        *LocalSourceV2      `yaml:"local,omitempty" mapstructure:"local"`
	EESTFixtures *EESTFixturesSource `yaml:"eest_fixtures,omitempty" mapstructure:"eest_fixtures"`
}

SourceConfig defines where to find test files.

func (*SourceConfig) IsConfigured

func (s *SourceConfig) IsConfigured() bool

IsConfigured returns true if any test source is configured.

func (*SourceConfig) Validate

func (s *SourceConfig) Validate() error

Validate checks the source configuration for errors.

type StepsConfig

type StepsConfig struct {
	Setup   []string `yaml:"setup,omitempty" mapstructure:"setup"`
	Test    []string `yaml:"test,omitempty" mapstructure:"test"`
	Cleanup []string `yaml:"cleanup,omitempty" mapstructure:"cleanup"`
}

StepsConfig defines glob patterns for each step type.

type TestsConfig

type TestsConfig struct {
	Filter string       `yaml:"filter,omitempty" mapstructure:"filter"`
	Source SourceConfig `yaml:"source,omitempty" mapstructure:"source"`
}

TestsConfig contains test execution settings.

type ThrottleDevice

type ThrottleDevice struct {
	Path string `yaml:"path" mapstructure:"path" json:"path"`
	Rate string `yaml:"rate" mapstructure:"rate" json:"rate"` // For bps: supports units like "12mb", "1024k". For iops: integer string.
}

ThrottleDevice defines a device throttle setting.

type ValidateOpts

type ValidateOpts struct {
	// ActiveInstanceIDs limits datadir validation to instances with these IDs.
	// When nil or empty, all instances are validated.
	ActiveInstanceIDs map[string]struct{}
	// ActiveClients limits global datadir validation to these client types.
	// When nil or empty, all global datadirs are validated.
	ActiveClients map[string]struct{}
}

ValidateOpts controls optional validation behavior.

Jump to

Keyboard shortcuts

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