TLB - rocket booster for your build

84
Motivation TLB Dev Adrenaline Thank you TLB rocket booster for your build Pavan KS 1 Janmejay Singh 2 1 mail: [email protected] blog: http://itspanzi.blogspot.com 2 mail: [email protected] blog: http://codehunk.wordpress.com Pavan, Janmejay TLB - http://test-load-balancer.github.com

description

TLB introduction slide-deck

Transcript of TLB - rocket booster for your build

Page 1: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

TLBrocket booster for your build

Pavan KS1 Janmejay Singh2

1mail: [email protected]: http://itspanzi.blogspot.com

2mail: [email protected]: http://codehunk.wordpress.com

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 2: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

TLB what?

A Free and Open Source software: BSD licensedCuts your build time by executing tests parallely on a gridSupports multiple build toolsSupports multiple testing toolsSupports multiple languages

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 3: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Whats in it for me?

What can I expect out of this session?

A small, hopefully interesting, story that describes aproblemHow we solved that problemHow we can help you solve itHow you can help us, help others solve it!

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 4: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Outline

1 MotivationProblem that we solvedDream: Fast Builds

2 TLBIntroducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

3 Dev AdrenalinePolynomial Time Set-Partitioning

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 5: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

Outline

1 MotivationProblem that we solvedDream: Fast Builds

2 TLBIntroducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

3 Dev AdrenalinePolynomial Time Set-Partitioning

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 6: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

The Story

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 7: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

This is the story of how we went from...

What is it doing that takes more than 2 hours and 7 minutes?

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 8: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

This is the story of how we went from...

What is it doing that takes more than 2 hours and 7 minutes?

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 9: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

to...

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 10: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

to...

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 11: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

With just a few lines changed in the build script & executingtests parallely.The longish build ’firefox’ split into 16 partitions to executedparallely on 16 virtual machines.

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 12: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

With just a few lines changed in the build script & executingtests parallely.The longish build ’firefox’ split into 16 partitions to executedparallely on 16 virtual machines.

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 13: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

Outline

1 MotivationProblem that we solvedDream: Fast Builds

2 TLBIntroducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

3 Dev AdrenalinePolynomial Time Set-Partitioning

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 14: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

Fast build = Rapid developmentDevs spend less time waiting to checkin

Need not be limited to unit/integration testsFunctional/Acceptance tests

Easier for devs to run precommit builds - Results in pullingupstream changes often and running builds frequently

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 15: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

Fast build = Rapid developmentDevs spend less time waiting to checkin

Need not be limited to unit/integration testsFunctional/Acceptance tests

Easier for devs to run precommit builds - Results in pullingupstream changes often and running builds frequently

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 16: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

Fast build = Rapid developmentDevs spend less time waiting to checkin

Need not be limited to unit/integration testsFunctional/Acceptance tests

Easier for devs to run precommit builds - Results in pullingupstream changes often and running builds frequently

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 17: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

Also we know that...

Major part of build time is spent in running testsSpeeding up builds is non trivialMost teams have a dev task for this don’t they??

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 18: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

Also we know that...

Major part of build time is spent in running testsSpeeding up builds is non trivialMost teams have a dev task for this don’t they??

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 19: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

Also we know that...

Major part of build time is spent in running testsSpeeding up builds is non trivialMost teams have a dev task for this don’t they??

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 20: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

Common solutions...

Split applications into modulesDifficult to model (typically end up in diamonddependencies)Pipelines (unit -> integration -> smoke -> functional) (serialprocess)BUT, if downstream dependencies fail, turn around time tofix is huge

Throw more hardware at it - Slice and diceHand written partitioning using directories/tags etc (unequalpartitions)

Logical! but Suboptimal :-(Nither too efficient nor effective.

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 21: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

Common solutions...

Split applications into modulesDifficult to model (typically end up in diamonddependencies)Pipelines (unit -> integration -> smoke -> functional) (serialprocess)BUT, if downstream dependencies fail, turn around time tofix is huge

Throw more hardware at it - Slice and diceHand written partitioning using directories/tags etc (unequalpartitions)

Logical! but Suboptimal :-(Nither too efficient nor effective.

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 22: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

Common solutions...

Split applications into modulesDifficult to model (typically end up in diamonddependencies)Pipelines (unit -> integration -> smoke -> functional) (serialprocess)BUT, if downstream dependencies fail, turn around time tofix is huge

Throw more hardware at it - Slice and diceHand written partitioning using directories/tags etc (unequalpartitions)

Logical! but Suboptimal :-(Nither too efficient nor effective.

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 23: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

Common solutions...

Split applications into modulesDifficult to model (typically end up in diamonddependencies)Pipelines (unit -> integration -> smoke -> functional) (serialprocess)BUT, if downstream dependencies fail, turn around time tofix is huge

Throw more hardware at it - Slice and diceHand written partitioning using directories/tags etc (unequalpartitions)

Logical! but Suboptimal :-(Nither too efficient nor effective.

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 24: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

Common solutions...

Split applications into modulesDifficult to model (typically end up in diamonddependencies)Pipelines (unit -> integration -> smoke -> functional) (serialprocess)BUT, if downstream dependencies fail, turn around time tofix is huge

Throw more hardware at it - Slice and diceHand written partitioning using directories/tags etc (unequalpartitions)

Logical! but Suboptimal :-(Nither too efficient nor effective.

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 25: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

Common solutions...

Split applications into modulesDifficult to model (typically end up in diamonddependencies)Pipelines (unit -> integration -> smoke -> functional) (serialprocess)BUT, if downstream dependencies fail, turn around time tofix is huge

Throw more hardware at it - Slice and diceHand written partitioning using directories/tags etc (unequalpartitions)

Logical! but Suboptimal :-(Nither too efficient nor effective.

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 26: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

Common solutions...

Split applications into modulesDifficult to model (typically end up in diamonddependencies)Pipelines (unit -> integration -> smoke -> functional) (serialprocess)BUT, if downstream dependencies fail, turn around time tofix is huge

Throw more hardware at it - Slice and diceHand written partitioning using directories/tags etc (unequalpartitions)

Logical! but Suboptimal :-(Nither too efficient nor effective.

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 27: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

Common solutions...

Split applications into modulesDifficult to model (typically end up in diamonddependencies)Pipelines (unit -> integration -> smoke -> functional) (serialprocess)BUT, if downstream dependencies fail, turn around time tofix is huge

Throw more hardware at it - Slice and diceHand written partitioning using directories/tags etc (unequalpartitions)

Logical! but Suboptimal :-(Nither too efficient nor effective.

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 28: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Problem that we solvedDream: Fast Builds

Optimal solution

Optimal solution can be obtained by minimizing, the followingexpression.

D(A1,A2, ...An) = max

∑x∈Ai

x

−min

∑x∈Aj

x

(1)

Its ideal when global minima for this function is reached.

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 29: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

Outline

1 MotivationProblem that we solvedDream: Fast Builds

2 TLBIntroducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

3 Dev AdrenalinePolynomial Time Set-Partitioning

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 30: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

What if partitioning can be off-loaded?

What does TLB do?Makes n partitionsUnderstands which partition the current test runnerprocess isEach partition runs only one of the n mutually exclusive &collectively exhaustive sets

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 31: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

What if partitioning can be off-loaded?

What does TLB do?Makes n partitionsUnderstands which partition the current test runnerprocess isEach partition runs only one of the n mutually exclusive &collectively exhaustive sets

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 32: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

What if partitioning can be off-loaded?

What does TLB do?Makes n partitionsUnderstands which partition the current test runnerprocess isEach partition runs only one of the n mutually exclusive &collectively exhaustive sets

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 33: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

For example:

Some potential balancing strategies could bePartition tests to make every set have equal number oftestsOr to have every set take about the same time to finish

Some of these strategies require a central place to store andretrive test-data(running-time, result etc)

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 34: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

For example:

Some potential balancing strategies could bePartition tests to make every set have equal number oftestsOr to have every set take about the same time to finish

Some of these strategies require a central place to store andretrive test-data(running-time, result etc)

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 35: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

For example:

Some potential balancing strategies could bePartition tests to make every set have equal number oftestsOr to have every set take about the same time to finish

Some of these strategies require a central place to store andretrive test-data(running-time, result etc)

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 36: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

For example:

Some potential balancing strategies could bePartition tests to make every set have equal number oftestsOr to have every set take about the same time to finish

Some of these strategies require a central place to store andretrive test-data(running-time, result etc)

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 37: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

SetupTypical Setup

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 38: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

SetupAlien Environment Setup

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 39: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

CommunicationServer-Client-Runner Talk

Step 1Receive list of to-be-run

tests from thetesting-framework

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 40: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

CommunicationServer-Client-Runner Talk

Step 2Fetch historical test data

from TLB server(tests thatfailed in the previous

run/time taken by each test)

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 41: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

CommunicationServer-Client-Runner Talk

Step 3Prune the list ofto-be-run tests to gettests to be actuallyexecuted(otherpartitions take care ofpruned items)Re-order the prunedlist,for instance pulltests that failed in theprevious run to executefirst

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 42: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

CommunicationServer-Client-Runner Talk

Step 4Let the party begin,execute the prunedtestsContinue capturingtest-result/test-time asthe suites run

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 43: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

CommunicationServer-Client-Runner Talk

Step 5Some feedback to the

server; posttest-run-time/test-resultsback, seeding data for

future runs

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 44: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

CommunicationServer-Client-Runner Talk

Step 6Terminate gracefully; build

task returns

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 45: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

Ok enough of handwaving!

Well, that was all too abstract, lets see what TLB has to offer interms of concrete features.

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 46: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

Outline

1 MotivationProblem that we solvedDream: Fast Builds

2 TLBIntroducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

3 Dev AdrenalinePolynomial Time Set-Partitioning

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 47: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

TLB Clientthe workhorse

TLB client has two major sub-units.

Balancer - the pruner guy (chosen by setting an environmentvariable TLB_CRITERIA)Orderer - the shuffler guy (chosen by setting an environmentvariable TLB_ORDERER)

both environment variables require fully qualified java class-names

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 48: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

TLB Clientthe workhorse

TLB client has two major sub-units.

Balancer - the pruner guy (chosen by setting an environmentvariable TLB_CRITERIA)Orderer - the shuffler guy (chosen by setting an environmentvariable TLB_ORDERER)

both environment variables require fully qualified java class-names

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 49: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

TLB Clientthe workhorse

TLB client has two major sub-units.

Balancer - the pruner guy (chosen by setting an environmentvariable TLB_CRITERIA)Orderer - the shuffler guy (chosen by setting an environmentvariable TLB_ORDERER)

both environment variables require fully qualified java class-names

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 50: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

TLB ClientBalancer

Count-based Balancing

20 tests / 4 splits = 5 tests on each

Conceptually straight-forwardInefficient in practiceTLB uses this as a fallback, not recomended as prefferedalgorithm

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 51: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

TLB ClientBalancer

Time-based Balancing(inspired by Amdahl‘s law)

N tests / 4 splits ≈ 4 splits that take equal time

Much better, yields fairly close to ideal solutionOne slow machine can not only slow down the current run,but skew balancing on the next one too

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 52: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

TLB ClientBalancer

Smoothened Time-based Balancing(Ensures no outliers, builds on top of time based balancing)

N tests / 4 splits ≈ 4 splits which take equal time based on historyover past few/several runs

While exponential smoothing, every test-time entry St ∀t > 0 isrecorded as:

S1 = xo (2)

St = αxt−1 + (1− α)St−1 ∀

{t > 10 < α < 1

(3)

Where α is the factor of smoothing, which can be tuned externally for every partition and x is unsmoothed reading.

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 53: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

TLB ClientBalancer

Default-chain Balancing

Allows users to define criteria chain, which is a COLON(:)seperated list of algorithmsThe chain may include some custom balancer recepies ofyour ownUsed to ensure build doesn’t fail when no data available todo advanced algorithms like Time-balanceAllows defaulting to simpler algorithms likeCount-balancing

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 54: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

TLB ClientBalancer

*XYZ* Balancing(This is not a canned algorithm, its something you can create)

You can create your custom balancing algorithm, and use itwith TLBThe contract is enforced by a java abstract class calledTestSplitterCriteriaIf it can potentially fail in some situations and you want afallback, you can use DefaultingTestSplitterCriteria withyour balancer in chainNote: Algorithm need to be repeatable, since its executedon every partition. Mutual-exclusion &Collective-exhausion are imparative.

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 55: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

TLB ClientOrderer

Failed First Orderer(Runs tests that failed last time around, first)

Perfect for fixing builds that have a tendency to break after6 in the eveningYou don’t need to wait for the entire build, just watch theconsole log for a few minutes, as you see the test you fixedpass and scroll by

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 56: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

TLB ClientOrderer

*ABC* Orderer(This is not a canned algorithm, its something you can create)

You can create your custom ordering algorithm, and use itwith TLBThe contract is enforced by a java abstract class calledTestOrdererOrdering tests to ensure execution-order/side-effects is aslippery slope and is considered an ANTI PATTERN, so westrongly recomend not abusing Ordering facility

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 57: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

TLB ClientCorrectness Checking

Correctness Checking(Optional extension that allows you to check correctness of partitioning algorithm and/or your build configuration.)

Asserts correctness of...

new partitioning/ordering algoritms, ensures mutualexclusion/collective exhaustionbuild configuration, testing framework configurationand TLB configuration in your environment

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 58: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

Outline

1 MotivationProblem that we solvedDream: Fast Builds

2 TLBIntroducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

3 Dev AdrenalinePolynomial Time Set-Partitioning

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 59: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

TLB Client needs to embed in build environment and interact with atesting-framework

Balancing JUnit test-suite using Apache-AntBalancing Cucumber test-suite using Rake

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 60: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

TLB Client needs to embed in build environment and interact with atesting-framework

Balancing JUnit test-suite using Apache-AntBalancing Cucumber test-suite using Rake

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 61: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

TLB Client needs to embed in build environment and interact with atesting-framework

Balancing JUnit test-suite using Apache-AntBalancing Cucumber test-suite using Rake

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 62: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

Outline

1 MotivationProblem that we solvedDream: Fast Builds

2 TLBIntroducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

3 Dev AdrenalinePolynomial Time Set-Partitioning

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 63: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

Leverage parallel execution capabilities oftools like...

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 64: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

or for that matter

Hudson, Bamboo, TeamCity, AntHill Pro(if you are rich enough),or even

Capistrano/Shell script fork(if you are apoor dev like us).

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 65: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

Supported Setup(s)

When we say Ruby, we mean both 1.9 and 1.8

Junit using Ant or Buildr for JavaRspec 1.x & 2.x using Rake on MRI and JRubyTest::Unit using Rake on MRI and JRubyCucumber using Rake on MRI and JRubyTwist using Ant or Buildr for Java

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 66: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

Supported Setup(s)

When we say Ruby, we mean both 1.9 and 1.8

Junit using Ant or Buildr for JavaRspec 1.x & 2.x using Rake on MRI and JRubyTest::Unit using Rake on MRI and JRubyCucumber using Rake on MRI and JRubyTwist using Ant or Buildr for Java

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 67: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

Supported Setup(s)

When we say Ruby, we mean both 1.9 and 1.8

Junit using Ant or Buildr for JavaRspec 1.x & 2.x using Rake on MRI and JRubyTest::Unit using Rake on MRI and JRubyCucumber using Rake on MRI and JRubyTwist using Ant or Buildr for Java

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 68: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

Supported Setup(s)

When we say Ruby, we mean both 1.9 and 1.8

Junit using Ant or Buildr for JavaRspec 1.x & 2.x using Rake on MRI and JRubyTest::Unit using Rake on MRI and JRubyCucumber using Rake on MRI and JRubyTwist using Ant or Buildr for Java

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 69: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

Supported Setup(s)

When we say Ruby, we mean both 1.9 and 1.8

Junit using Ant or Buildr for JavaRspec 1.x & 2.x using Rake on MRI and JRubyTest::Unit using Rake on MRI and JRubyCucumber using Rake on MRI and JRubyTwist using Ant or Buildr for Java

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 70: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

Working on...

Junit using Maven on Java

Waiting on http://jira.codehaus.org/browse/SUREFIRE-726

Check out http://tinyurl.com/ceal2uy (google groups thread andpatchset)

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 71: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

We plan to support...

TestNG on Java

JBehave on Java

NUnit on .Net

MS Test on .Net

PyUnit on Python

CPPUnit on C++

5am (fiveam) onCommonLisp... on ...

NAnt on .NetMS Build on .Net... on ...

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 72: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

While thats our wish-list

Bad news is, we haven’t started work on most of these yet.Good news is, we have good hackers, like yourself,listening to us here, who can help!

We’d love to support anything else that you can make time tocontribute :-)

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 73: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

While thats our wish-list

Bad news is, we haven’t started work on most of these yet.Good news is, we have good hackers, like yourself,listening to us here, who can help!

We’d love to support anything else that you can make time tocontribute :-)

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 74: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Introducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

While thats our wish-list

Bad news is, we haven’t started work on most of these yet.Good news is, we have good hackers, like yourself,listening to us here, who can help!

We’d love to support anything else that you can make time tocontribute :-)

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 75: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Polynomial Time Set-Partitioning

Outline

1 MotivationProblem that we solvedDream: Fast Builds

2 TLBIntroducing TLBConcepts in TLBShow me the code honey!Hooking TLB up with your build process

3 Dev AdrenalinePolynomial Time Set-Partitioning

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 76: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Polynomial Time Set-Partitioning

Partitioning Approaches

Greedy Algorithm (time-balancing-criteria uses this one)Differencing Algorithm (half done, not upstrem yet)GA spike, terrifingly good (upstream as a spike, written inCommonLisp, needs some more tuning)

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 77: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Polynomial Time Set-Partitioning

GA spike for set-partitioning

TLB doesn’t have it yet; coming soon!

Check details @ http://github.com/test-load-balancer/set-part

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 78: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Polynomial Time Set-Partitioning

Keep children when..fitness function

The new generation

A′x = x1...xi + yj ...yj+δ′ + xj+δ+1...xn (4)A′y = y1...yj + xi ...xi+δ + yj+δ′+1...ym (5)

Can be considered better than parents

Ax and Ay iff :

SD(Ax ,Ay ) > SD(A′x ,A′y )

{A =

∑Xi=1 Uxi

k : k = no. of bags(6)

This is just one way to mesure the evolution of the newgeneration.

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 79: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Polynomial Time Set-Partitioning

Random numbers0 < n < 10000; 10 generations

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 80: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Polynomial Time Set-Partitioning

Random numbers0 < n < 10000; 100 generations

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 81: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Polynomial Time Set-Partitioning

Random numbers0 < n < 10000; 1000 generations

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 82: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Polynomial Time Set-Partitioning

Random numbers0 < n < 10000; 10000 generations

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 83: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Polynomial Time Set-Partitioning

Band distribution of numbers0 < 60%X’es < 20%; 60% < 20%X’es < 80%; 80% < 20%X’es; 10000 generations

Pavan, Janmejay TLB - http://test-load-balancer.github.com

Page 84: TLB - rocket booster for your build

MotivationTLB

Dev AdrenalineThank you

Thank you

We are patch hungry*.Please Contribute.

(its BSD 2 clause)

Thank you.References:

http://test-load-balancer.github.comhttp://goo.gl/39t20 [TLB how to YouTube playlist]

* http://code.google.com/p/tlb/issues/list

Pavan, Janmejay TLB - http://test-load-balancer.github.com