Your SlideShare is downloading. ×
TLB - rocket booster for your build
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

TLB - rocket booster for your build

8,992
views

Published on

TLB introduction slide-deck …

TLB introduction slide-deck

Published in: Technology, Spiritual

0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
8,992
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
22
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Motivation TLB Dev Adrenaline Thank you TLB rocket booster for your buildPavan KS1 Janmejay Singh2 1 mail: itspanzi@gmail.com blog: http://itspanzi.blogspot.com 2 mail: singh.janmejay@gmail.com blog: http://codehunk.wordpress.com Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 2. Motivation TLB Dev Adrenaline Thank youTLB what? A Free and Open Source software: BSD licensed Cuts your build time by executing tests parallely on a grid Supports multiple build tools Supports multiple testing tools Supports multiple languages Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 3. Motivation TLB Dev Adrenaline Thank youWhats in it for me? What can I expect out of this session? A small, hopefully interesting, story that describes a problem How we solved that problem How we can help you solve it How you can help us, help others solve it! Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 4. Motivation TLB Dev Adrenaline Thank youOutline 1 Motivation Problem that we solved Dream: Fast Builds 2 TLB Introducing TLB Concepts in TLB Show me the code honey! Hooking TLB up with your build process 3 Dev Adrenaline Polynomial Time Set-Partitioning Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 5. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youOutline 1 Motivation Problem that we solved Dream: Fast Builds 2 TLB Introducing TLB Concepts in TLB Show me the code honey! Hooking TLB up with your build process 3 Dev Adrenaline Polynomial Time Set-Partitioning Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 6. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank you The StoryPavan, Janmejay TLB - http://test-load-balancer.github.com
  • 7. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youThis 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
  • 8. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youThis 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
  • 9. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youto... Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 10. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youto... Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 11. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youWith 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
  • 12. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youWith 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
  • 13. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youOutline 1 Motivation Problem that we solved Dream: Fast Builds 2 TLB Introducing TLB Concepts in TLB Show me the code honey! Hooking TLB up with your build process 3 Dev Adrenaline Polynomial Time Set-Partitioning Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 14. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youFast build = Rapid developmentDevs spend less time waiting to checkin Need not be limited to unit/integration tests Functional/Acceptance testsEasier for devs to run precommit builds - Results in pullingupstream changes often and running builds frequently Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 15. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youFast build = Rapid developmentDevs spend less time waiting to checkin Need not be limited to unit/integration tests Functional/Acceptance testsEasier for devs to run precommit builds - Results in pullingupstream changes often and running builds frequently Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 16. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youFast build = Rapid developmentDevs spend less time waiting to checkin Need not be limited to unit/integration tests Functional/Acceptance testsEasier for devs to run precommit builds - Results in pullingupstream changes often and running builds frequently Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 17. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youAlso we know that... Major part of build time is spent in running tests Speeding up builds is non trivial Most teams have a dev task for this don’t they?? Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 18. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youAlso we know that... Major part of build time is spent in running tests Speeding up builds is non trivial Most teams have a dev task for this don’t they?? Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 19. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youAlso we know that... Major part of build time is spent in running tests Speeding up builds is non trivial Most teams have a dev task for this don’t they?? Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 20. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youCommon solutions... Split applications into modules Difficult to model (typically end up in diamond dependencies) Pipelines (unit -> integration -> smoke -> functional) (serial process) BUT, if downstream dependencies fail, turn around time to fix is huge Throw more hardware at it - Slice and dice Hand written partitioning using directories/tags etc (unequal partitions) Logical! but Suboptimal :-( Nither too efficient nor effective. Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 21. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youCommon solutions... Split applications into modules Difficult to model (typically end up in diamond dependencies) Pipelines (unit -> integration -> smoke -> functional) (serial process) BUT, if downstream dependencies fail, turn around time to fix is huge Throw more hardware at it - Slice and dice Hand written partitioning using directories/tags etc (unequal partitions) Logical! but Suboptimal :-( Nither too efficient nor effective. Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 22. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youCommon solutions... Split applications into modules Difficult to model (typically end up in diamond dependencies) Pipelines (unit -> integration -> smoke -> functional) (serial process) BUT, if downstream dependencies fail, turn around time to fix is huge Throw more hardware at it - Slice and dice Hand written partitioning using directories/tags etc (unequal partitions) Logical! but Suboptimal :-( Nither too efficient nor effective. Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 23. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youCommon solutions... Split applications into modules Difficult to model (typically end up in diamond dependencies) Pipelines (unit -> integration -> smoke -> functional) (serial process) BUT, if downstream dependencies fail, turn around time to fix is huge Throw more hardware at it - Slice and dice Hand written partitioning using directories/tags etc (unequal partitions) Logical! but Suboptimal :-( Nither too efficient nor effective. Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 24. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youCommon solutions... Split applications into modules Difficult to model (typically end up in diamond dependencies) Pipelines (unit -> integration -> smoke -> functional) (serial process) BUT, if downstream dependencies fail, turn around time to fix is huge Throw more hardware at it - Slice and dice Hand written partitioning using directories/tags etc (unequal partitions) Logical! but Suboptimal :-( Nither too efficient nor effective. Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 25. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youCommon solutions... Split applications into modules Difficult to model (typically end up in diamond dependencies) Pipelines (unit -> integration -> smoke -> functional) (serial process) BUT, if downstream dependencies fail, turn around time to fix is huge Throw more hardware at it - Slice and dice Hand written partitioning using directories/tags etc (unequal partitions) Logical! but Suboptimal :-( Nither too efficient nor effective. Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 26. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youCommon solutions... Split applications into modules Difficult to model (typically end up in diamond dependencies) Pipelines (unit -> integration -> smoke -> functional) (serial process) BUT, if downstream dependencies fail, turn around time to fix is huge Throw more hardware at it - Slice and dice Hand written partitioning using directories/tags etc (unequal partitions) Logical! but Suboptimal :-( Nither too efficient nor effective. Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 27. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youCommon solutions... Split applications into modules Difficult to model (typically end up in diamond dependencies) Pipelines (unit -> integration -> smoke -> functional) (serial process) BUT, if downstream dependencies fail, turn around time to fix is huge Throw more hardware at it - Slice and dice Hand written partitioning using directories/tags etc (unequal partitions) Logical! but Suboptimal :-( Nither too efficient nor effective. Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 28. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank youOptimal solution Optimal solution can be obtained by minimizing, the following expression.         D(A1 , A2 , ...An ) = max x − min x (1)     x∈Ai x∈Aj Its ideal when global minima for this function is reached. Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 29. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processOutline 1 Motivation Problem that we solved Dream: Fast Builds 2 TLB Introducing TLB Concepts in TLB Show me the code honey! Hooking TLB up with your build process 3 Dev Adrenaline Polynomial Time Set-Partitioning Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 30. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processWhat if partitioning can be off-loaded? What does TLB do? Makes n partitions Understands which partition the current test runner process is Each partition runs only one of the n mutually exclusive & collectively exhaustive sets Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 31. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processWhat if partitioning can be off-loaded? What does TLB do? Makes n partitions Understands which partition the current test runner process is Each partition runs only one of the n mutually exclusive & collectively exhaustive sets Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 32. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processWhat if partitioning can be off-loaded? What does TLB do? Makes n partitions Understands which partition the current test runner process is Each partition runs only one of the n mutually exclusive & collectively exhaustive sets Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 33. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processFor example: Some potential balancing strategies could be Partition tests to make every set have equal number of tests Or to have every set take about the same time to finish Some of these strategies require a central place to store and retrive test-data(running-time, result etc) Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 34. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processFor example: Some potential balancing strategies could be Partition tests to make every set have equal number of tests Or to have every set take about the same time to finish Some of these strategies require a central place to store and retrive test-data(running-time, result etc) Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 35. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processFor example: Some potential balancing strategies could be Partition tests to make every set have equal number of tests Or to have every set take about the same time to finish Some of these strategies require a central place to store and retrive test-data(running-time, result etc) Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 36. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processFor example: Some potential balancing strategies could be Partition tests to make every set have equal number of tests Or to have every set take about the same time to finish Some of these strategies require a central place to store and retrive test-data(running-time, result etc) Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 37. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processSetupTypical Setup Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 38. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processSetupAlien Environment Setup Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 39. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processCommunicationServer-Client-Runner Talk Step 1 Receive list of to-be-run tests from the testing-framework Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 40. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processCommunicationServer-Client-Runner Talk Step 2 Fetch historical test data from TLB server(tests that failed in the previous run/time taken by each test) Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 41. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processCommunicationServer-Client-Runner Talk Step 3 Prune the list of to-be-run tests to get tests to be actually executed(other partitions take care of pruned items) Re-order the pruned list,for instance pull tests that failed in the previous run to execute first Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 42. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processCommunicationServer-Client-Runner Talk Step 4 Let the party begin, execute the pruned tests Continue capturing test-result/test-time as the suites run Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 43. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processCommunicationServer-Client-Runner Talk Step 5 Some feedback to the server; post test-run-time/test-results back, seeding data for future runs Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 44. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processCommunicationServer-Client-Runner Talk Step 6 Terminate gracefully; build task returns Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 45. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processOk enough of handwaving! Well, that was all too abstract, lets see what TLB has to offer in terms of concrete features. Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 46. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processOutline 1 Motivation Problem that we solved Dream: Fast Builds 2 TLB Introducing TLB Concepts in TLB Show me the code honey! Hooking TLB up with your build process 3 Dev Adrenaline Polynomial Time Set-Partitioning Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 47. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processTLB Clientthe workhorse TLB client has two major sub-units. Balancer - the pruner guy (chosen by setting an environment variable TLB_CRITERIA) Orderer - the shuffler guy (chosen by setting an environment variable TLB_ORDERER) both environment variables require fully qualified java class-names Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 48. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processTLB Clientthe workhorse TLB client has two major sub-units. Balancer - the pruner guy (chosen by setting an environment variable TLB_CRITERIA) Orderer - the shuffler guy (chosen by setting an environment variable TLB_ORDERER) both environment variables require fully qualified java class-names Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 49. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processTLB Clientthe workhorse TLB client has two major sub-units. Balancer - the pruner guy (chosen by setting an environment variable TLB_CRITERIA) Orderer - the shuffler guy (chosen by setting an environment variable TLB_ORDERER) both environment variables require fully qualified java class-names Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 50. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processTLB ClientBalancer Count-based Balancing 20 tests / 4 splits = 5 tests on each Conceptually straight-forward Inefficient in practice TLB uses this as a fallback, not recomended as preffered algorithm Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 51. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processTLB 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 solution One 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
  • 52. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processTLB 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 history over past few/several runs While exponential smoothing, every test-time entry St ∀t > 0 is recorded as: S1 = xo (2) t >1 St = αxt−1 + (1 − α)St−1 ∀ (3) 0<α<1 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
  • 53. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processTLB ClientBalancer Default-chain Balancing Allows users to define criteria chain, which is a COLON(:) seperated list of algorithms The chain may include some custom balancer recepies of your own Used to ensure build doesn’t fail when no data available to do advanced algorithms like Time-balance Allows defaulting to simpler algorithms like Count-balancing Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 54. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processTLB ClientBalancer *XYZ* Balancing (This is not a canned algorithm, its something you can create) You can create your custom balancing algorithm, and use it with TLB The contract is enforced by a java abstract class called TestSplitterCriteria If it can potentially fail in some situations and you want a fallback, you can use DefaultingTestSplitterCriteria with your balancer in chain Note: Algorithm need to be repeatable, since its executed on every partition. Mutual-exclusion & Collective-exhausion are imparative. Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 55. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processTLB ClientOrderer Failed First Orderer (Runs tests that failed last time around, first) Perfect for fixing builds that have a tendency to break after 6 in the evening You don’t need to wait for the entire build, just watch the console log for a few minutes, as you see the test you fixed pass and scroll by Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 56. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processTLB ClientOrderer *ABC* Orderer (This is not a canned algorithm, its something you can create) You can create your custom ordering algorithm, and use it with TLB The contract is enforced by a java abstract class called TestOrderer Ordering tests to ensure execution-order/side-effects is a slippery slope and is considered an ANTI PATTERN, so we strongly recomend not abusing Ordering facility Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 57. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processTLB 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 mutual exclusion/collective exhaustion build configuration, testing framework configuration and TLB configuration in your environment Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 58. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processOutline 1 Motivation Problem that we solved Dream: Fast Builds 2 TLB Introducing TLB Concepts in TLB Show me the code honey! Hooking TLB up with your build process 3 Dev Adrenaline Polynomial Time Set-Partitioning Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 59. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processTLB Client needs to embed in build environment and interact with a testing-framework Balancing JUnit test-suite using Apache-Ant Balancing Cucumber test-suite using Rake Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 60. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processTLB Client needs to embed in build environment and interact with a testing-framework Balancing JUnit test-suite using Apache-Ant Balancing Cucumber test-suite using Rake Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 61. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processTLB Client needs to embed in build environment and interact with a testing-framework Balancing JUnit test-suite using Apache-Ant Balancing Cucumber test-suite using Rake Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 62. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processOutline 1 Motivation Problem that we solved Dream: Fast Builds 2 TLB Introducing TLB Concepts in TLB Show me the code honey! Hooking TLB up with your build process 3 Dev Adrenaline Polynomial Time Set-Partitioning Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 63. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processLeverage parallel execution capabilities oftools like... Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 64. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processor for that matter Hudson, Bamboo, TeamCity, Ant Hill Pro(if you are rich enough),or even Capistrano/Shell script fork(if you are a poor dev like us). Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 65. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processSupported Setup(s) When we say Ruby, we mean both 1.9 and 1.8 Junit using Ant or Buildr for Java Rspec 1.x & 2.x using Rake on MRI and JRuby Test::Unit using Rake on MRI and JRuby Cucumber using Rake on MRI and JRuby Twist using Ant or Buildr for Java Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 66. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processSupported Setup(s) When we say Ruby, we mean both 1.9 and 1.8 Junit using Ant or Buildr for Java Rspec 1.x & 2.x using Rake on MRI and JRuby Test::Unit using Rake on MRI and JRuby Cucumber using Rake on MRI and JRuby Twist using Ant or Buildr for Java Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 67. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processSupported Setup(s) When we say Ruby, we mean both 1.9 and 1.8 Junit using Ant or Buildr for Java Rspec 1.x & 2.x using Rake on MRI and JRuby Test::Unit using Rake on MRI and JRuby Cucumber using Rake on MRI and JRuby Twist using Ant or Buildr for Java Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 68. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processSupported Setup(s) When we say Ruby, we mean both 1.9 and 1.8 Junit using Ant or Buildr for Java Rspec 1.x & 2.x using Rake on MRI and JRuby Test::Unit using Rake on MRI and JRuby Cucumber using Rake on MRI and JRuby Twist using Ant or Buildr for Java Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 69. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processSupported Setup(s) When we say Ruby, we mean both 1.9 and 1.8 Junit using Ant or Buildr for Java Rspec 1.x & 2.x using Rake on MRI and JRuby Test::Unit using Rake on MRI and JRuby Cucumber using Rake on MRI and JRuby Twist using Ant or Buildr for Java Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 70. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processWorking on... Junit using Maven on Java Waiting on http://jira.codehaus.org/browse/SUREFIRE-726 Check out http://tinyurl.com/ceal2uy (google groups thread and patchset) Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 71. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processWe plan to support... TestNG on Java 5am (fiveam) on JBehave on Java CommonLisp NUnit on .Net ... on ... MS Test on .Net NAnt on .Net PyUnit on Python MS Build on .Net CPPUnit on C++ ... on ... Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 72. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processWhile 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 to contribute :-) Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 73. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processWhile 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 to contribute :-) Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 74. Motivation Introducing TLB TLB Concepts in TLB Dev Adrenaline Show me the code honey! Thank you Hooking TLB up with your build processWhile 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 to contribute :-) Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 75. Motivation TLB Polynomial Time Set-Partitioning Dev Adrenaline Thank youOutline 1 Motivation Problem that we solved Dream: Fast Builds 2 TLB Introducing TLB Concepts in TLB Show me the code honey! Hooking TLB up with your build process 3 Dev Adrenaline Polynomial Time Set-Partitioning Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 76. Motivation TLB Polynomial Time Set-Partitioning Dev Adrenaline Thank youPartitioning 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 in CommonLisp, needs some more tuning) Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 77. Motivation TLB Polynomial Time Set-Partitioning Dev Adrenaline Thank youGA 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
  • 78. Motivation TLB Polynomial Time Set-Partitioning Dev Adrenaline Thank youKeep children when..fitness function The new generation Ax = x1 ...xi + yj ...yj+δ + xj+δ+1 ...xn (4) Ay = y1 ...yj + xi ...xi+δ + yj+δ +1 ...ym (5) Can be considered better than parents Ax and Ay iff : X ¯ Uxi SD(Ax , Ay ) > SD(Ax , Ay ) A = i=1 : k = no. of bags k (6) This is just one way to mesure the evolution of the new generation. Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 79. Motivation TLB Polynomial Time Set-Partitioning Dev Adrenaline Thank youRandom numbers0 < n < 10000; 10 generations Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 80. Motivation TLB Polynomial Time Set-Partitioning Dev Adrenaline Thank youRandom numbers0 < n < 10000; 100 generations Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 81. Motivation TLB Polynomial Time Set-Partitioning Dev Adrenaline Thank youRandom numbers0 < n < 10000; 1000 generations Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 82. Motivation TLB Polynomial Time Set-Partitioning Dev Adrenaline Thank youRandom numbers0 < n < 10000; 10000 generations Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 83. Motivation TLB Polynomial Time Set-Partitioning Dev Adrenaline Thank youBand 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
  • 84. Motivation TLB Dev Adrenaline Thank youThank you We are patch hungry*. Please Contribute. (its BSD 2 clause) Thank you. References: http://test-load-balancer.github.com http://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