Documentation
¶
Overview ¶
Package preprocess provides filters and transformations for workflow run data that must be applied before any statistical analysis.
Index ¶
- func ComputeRerunStats(details []model.RunDetail) map[int64]RerunStats
- func DeduplicateRetries(details []model.RunDetail) []model.RunDetail
- func ExcludeFailures(details []model.RunDetail) []model.RunDetail
- func FilterByBranch(details []model.RunDetail, branch string) []model.RunDetail
- func ParseMatrixJobName(name string) (base, variant string)
- type Options
- type RerunStats
- type Warning
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeRerunStats ¶
func ComputeRerunStats(details []model.RunDetail) map[int64]RerunStats
ComputeRerunStats computes per-workflow retry statistics from unfiltered data. Must be called before DeduplicateRetries. Returns only workflows that had at least one retry.
func DeduplicateRetries ¶
DeduplicateRetries keeps only the latest attempt for each run ID. GitHub Actions creates new run_attempt numbers for re-runs but keeps the same run ID.
func ExcludeFailures ¶
ExcludeFailures keeps only runs with conclusion "success".
func FilterByBranch ¶
FilterByBranch keeps only runs from the specified branch.
func ParseMatrixJobName ¶
ParseMatrixJobName splits a job name like "test (ubuntu-latest, 20)" into base="test" and variant="ubuntu-latest, 20". If there are no parentheses, variant is empty.
Types ¶
type Options ¶
type Options struct {
Branch string // filter to this branch (empty = no filter)
IncludeFailures bool // if false, exclude non-success conclusions
}
Options controls which preprocessing steps are applied.
type RerunStats ¶
type RerunStats struct {
UniqueRuns int // distinct run IDs
RetriedRuns int // runs with more than 1 attempt
ExtraAttempts int // total extra attempts (sum of max_attempt - 1 per retried run)
RerunRate float64 // fraction of unique runs that were retried
}
RerunStats holds retry statistics for a workflow.
type Warning ¶
type Warning = diag.Diagnostic
Warning is a deprecated alias for diag.Diagnostic. Use diag.Diagnostic directly.