splitter

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options added in v0.2.0

type Options struct {
	Index   int           // Current node index (0-based)
	Total   int           // Total number of nodes
	GroupBy string        // Grouping strategy: "none" or "package"
	Cache   *timing.Cache // Optional timing cache for weighted splitting
}

Options configures how tests are split across nodes.

type Result added in v0.2.1

type Result struct {
	Index             int                      // Node index
	Total             int                      // Total nodes
	Tests             []finder.TestInfo        // Tests assigned to this node
	EstimatedDuration time.Duration            // Estimated total duration
	PackageCounts     map[string]int           // Test count per package
	PackageDurations  map[string]time.Duration // Duration per package
}

Result contains the outcome of splitting tests for a node.

func Split added in v0.2.1

func Split(tests []finder.TestInfo, opts Options) *Result

Split distributes tests across nodes and returns the result for the specified index.

func (*Result) Pattern added in v0.2.1

func (r *Result) Pattern() string

Pattern returns a regex pattern matching the assigned tests.

Jump to

Keyboard shortcuts

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