Documentation
¶
Overview ¶
Package stressprofile loads and validates the YAML profiles that drive the local stress harness, including the pass/fail budgets it judges a run by.
Index ¶
Constants ¶
const EnvProfile = "LEVELRAIL_STRESS_PROFILE"
EnvProfile names the profile file when no path is given on the command line.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Profile ¶
type Profile struct {
Name string `yaml:"name"`
Seed uint64 `yaml:"seed"`
Apps int `yaml:"apps"`
Databases int `yaml:"databases"`
Nodes int `yaml:"nodes"`
SeededDeploys int `yaml:"seeded_deploys"`
EnvsPerApp int `yaml:"envs_per_app"`
DomainsPerApp int `yaml:"domains_per_app"`
DeploysPerMinute int `yaml:"deploys_per_minute"`
ListClients int `yaml:"list_clients"`
WatchClients int `yaml:"watch_clients"`
LogLinesPerSec int `yaml:"log_lines_per_second"`
Duration time.Duration `yaml:"duration"`
Thresholds Thresholds `yaml:"thresholds"`
}
Profile describes one stress run: the estate to seed, the load to apply and the budgets to hold.
func Load ¶
Load reads a profile from path, or from the file named by LEVELRAIL_STRESS_PROFILE when path is empty.
func Parse ¶
Parse decodes and validates a profile, rejecting unknown keys so a typo cannot silently drop a budget.
func (Profile) PhaseSplit ¶
PhaseSplit divides Duration into the steady, churn and load windows.
type Thresholds ¶
type Thresholds struct {
P95Ms float64 `yaml:"p95_ms"`
P99Ms float64 `yaml:"p99_ms"`
MaxRSSMB float64 `yaml:"max_rss_mb"`
MaxGoroutines int `yaml:"max_goroutines"`
MaxSQLiteMB float64 `yaml:"max_sqlite_mb"`
MaxReconcilePassMs float64 `yaml:"max_reconcile_pass_ms"`
MaxErrorRatePct float64 `yaml:"max_error_rate_pct"`
}
Thresholds are the budgets a run must stay within; every field is required.