Documentation
¶
Overview ¶
Package soak records control plane resource samples during a long churn run and decides pass or fail from growth between the start and the end.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckRatchet ¶
CheckRatchet adds a violation to res when the run ended worse than prev by more than slackPct.
func SaveRatchet ¶
SaveRatchet writes the end state of sum.
Types ¶
type Limits ¶
type Limits struct {
RSSGrowthPct float64 `json:"rss_growth_pct"`
GoroutineGrowth int `json:"goroutine_growth"`
FDGrowth int `json:"fd_growth"`
WALMaxBytes int64 `json:"wal_max_bytes"`
ErrorRatePct float64 `json:"error_rate_pct"`
}
Limits are the ratchet bounds. A zero field disables that check.
type Ratchet ¶
type Ratchet struct {
EndRSSBytes uint64 `json:"end_rss_bytes"`
EndGoroutines int `json:"end_goroutines"`
EndOpenFDs int `json:"end_open_fds"`
}
Ratchet is the end state of a previous passing run. A later run fails when it ends worse than this by more than the slack, so growth cannot creep in.
type Result ¶
type Result struct {
Pass bool `json:"pass"`
Violations []string `json:"violations"`
Summary Summary `json:"summary"`
}
Result is the verdict of Evaluate.
type Sample ¶
type Sample struct {
At time.Time
RSSBytes uint64
Goroutines int
OpenFDs int
WALBytes int64
Requests int64
Errors int64
}
Sample is one reading of the control plane plus the churn counters so far.
type Summary ¶
type Summary struct {
Samples int `json:"samples"`
StartRSSBytes uint64 `json:"start_rss_bytes"`
EndRSSBytes uint64 `json:"end_rss_bytes"`
StartGoroutines int `json:"start_goroutines"`
EndGoroutines int `json:"end_goroutines"`
StartOpenFDs int `json:"start_open_fds"`
EndOpenFDs int `json:"end_open_fds"`
MaxWALBytes int64 `json:"max_wal_bytes"`
Requests int64 `json:"requests"`
Errors int64 `json:"errors"`
ErrorRatePct float64 `json:"error_rate_pct"`
}
Summary is the steady state at the start and end of a run, medians over a window so one spike does not decide the verdict.