Test Load Balancer(TLB)



Please use a javascript enabled browser to read this documentation(some of the documentation pages use controls that need javascript support to render)

Count Based Criterion:

This criterion splits the test suite into a given number of units such that each unit has an equal or optimally equal number of tests.

For example:

You need to set TLB_SPLITTER='tlb.splitter.CountBasedTestSplitter' to use count based splitting. But this is not recomended except as a fallback, because in our experience, this is almost always suboptimal.


Time Based Criterion:

This criterion splits the test suite into a given number of units such that each unit, when executed, takes the same or optimally same amount of time.

For example:
You need to set TLB_SPLITTER='tlb.splitter.TimeBasedTestSplitter' to use time based splitting. But this is not recomended either, because the first time your build runs, it won't have data to time balance(which means it will fail).

Delegating/Failover Criterion:(Recomended)

This criterion delegates to a criteria chain, trying criterion in order, until reaches the last one. This is recomended way of using ‘time based’ setup. We make a chain of ‘time based splitter’ followed by ‘count based splitter’ so if time based splitting fails(which may happen because the server is momenteraly unreachable, or its the first time build is running and time balancing data is not available), it defaults to ‘count balancing’ which doesn’t require the ‘test suite time’ data. If all criterion in the chain fail, the build fails.

Delegating criterion requires TLB_PREFERRED_SPLITTERS to be set to a colon(:) separated list of fully qualified names of criteria classes. For instance, a typical time followed by count criteria would look like ‘tlb.splitter.TimeBasedTestSplitter:tlb.splitter.CountBasedTestSplitter’

The test split criteria is passed in using the environment variable TLB_SPLITTER. If this variable is not set, TLB by default uses a criteria that doesn’t do any balancing at all.

You need to set TLB_SPLITTER='tlb.splitter.DefaultingTestSplitter' TLB_PREFERRED_SPLITTERS='tlb.splitter.TimeBasedTestSplitter:tlb.splitter.CountBasedTestSplitter' to use delegating/defaulting criterion. The setting above tries time based balacing first, and then defaults to count based balacing in case it fails.