sharding

package
v0.0.0-...-15a9a0c Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package sharding implements the test sharding algorithm.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Shard

type Shard struct {
	// Included is a list of tests in the shard and to be requested to run.
	// This may include tests that will be skipped due to unsatisfied
	// dependencies.
	Included []*driver.BundleEntity

	// Excluded is a list of tests not in the shard and to be ignored.
	Excluded []*driver.BundleEntity
}

Shard represents a set of tests included/excluded in a shard.

func ComputeAlpha

func ComputeAlpha(tests []*driver.BundleEntity, shardIndex, totalShards int) *Shard

ComputeAlpha computes a set of tests to include/exclude in the specified shard by lexiographic.

func ComputeHash

func ComputeHash(tests []*driver.BundleEntity, shardIndex, totalShards int) *Shard

ComputeHash computes a set of tests to include/exclude in the specified shard by hash. This is experimental for now, and will potentially produce empty shards. If you see issues when this is rolling out please file a buganizer issue to component 1152900.

Jump to

Keyboard shortcuts

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