SlideShare ist ein Scribd-Unternehmen logo
1 von 84
Downloaden Sie, um offline zu lesen
Motivation
               TLB
     Dev Adrenaline
         Thank you




                 TLB
 rocket booster for your build


Pavan 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
Motivation
                               TLB
                     Dev Adrenaline
                         Thank you


TLB 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
Motivation
                                 TLB
                       Dev Adrenaline
                           Thank you


Whats 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
Motivation
                                 TLB
                       Dev Adrenaline
                           Thank you


Outline

  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
Motivation
                                 TLB    Problem that we solved
                       Dev Adrenaline   Dream: Fast Builds
                           Thank you


Outline

  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
Motivation
           TLB    Problem that we solved
 Dev Adrenaline   Dream: Fast Builds
     Thank you




  The Story




Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation
                                 TLB    Problem that we solved
                       Dev Adrenaline   Dream: Fast Builds
                           Thank you


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
Motivation
                                 TLB    Problem that we solved
                       Dev Adrenaline   Dream: Fast Builds
                           Thank you


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
Motivation
                   TLB    Problem that we solved
         Dev Adrenaline   Dream: Fast Builds
             Thank you


to...




        Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation
                   TLB    Problem that we solved
         Dev Adrenaline   Dream: Fast Builds
             Thank you


to...




        Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation
                            TLB    Problem that we solved
                  Dev Adrenaline   Dream: Fast Builds
                      Thank you




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




                 Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation
                            TLB    Problem that we solved
                  Dev Adrenaline   Dream: Fast Builds
                      Thank you




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




                 Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation
                                 TLB    Problem that we solved
                       Dev Adrenaline   Dream: Fast Builds
                           Thank you


Outline

  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
Motivation
                            TLB    Problem that we solved
                  Dev Adrenaline   Dream: Fast Builds
                      Thank you




Fast build = Rapid development
Devs spend less time waiting to checkin
    Need not be limited to unit/integration tests
    Functional/Acceptance tests
Easier for devs to run precommit builds - Results in pulling
upstream changes often and running builds frequently




                 Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation
                            TLB    Problem that we solved
                  Dev Adrenaline   Dream: Fast Builds
                      Thank you




Fast build = Rapid development
Devs spend less time waiting to checkin
    Need not be limited to unit/integration tests
    Functional/Acceptance tests
Easier for devs to run precommit builds - Results in pulling
upstream changes often and running builds frequently




                 Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation
                            TLB    Problem that we solved
                  Dev Adrenaline   Dream: Fast Builds
                      Thank you




Fast build = Rapid development
Devs spend less time waiting to checkin
    Need not be limited to unit/integration tests
    Functional/Acceptance tests
Easier for devs to run precommit builds - Results in pulling
upstream changes often and running builds frequently




                 Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation
                                TLB    Problem that we solved
                      Dev Adrenaline   Dream: Fast Builds
                          Thank you


Also 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
Motivation
                                TLB    Problem that we solved
                      Dev Adrenaline   Dream: Fast Builds
                          Thank you


Also 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
Motivation
                                TLB    Problem that we solved
                      Dev Adrenaline   Dream: Fast Builds
                          Thank you


Also 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
Motivation
                                   TLB    Problem that we solved
                         Dev Adrenaline   Dream: Fast Builds
                             Thank you


Common 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
Motivation
                                   TLB    Problem that we solved
                         Dev Adrenaline   Dream: Fast Builds
                             Thank you


Common 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
Motivation
                                   TLB    Problem that we solved
                         Dev Adrenaline   Dream: Fast Builds
                             Thank you


Common 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
Motivation
                                   TLB    Problem that we solved
                         Dev Adrenaline   Dream: Fast Builds
                             Thank you


Common 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
Motivation
                                   TLB    Problem that we solved
                         Dev Adrenaline   Dream: Fast Builds
                             Thank you


Common 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
Motivation
                                   TLB    Problem that we solved
                         Dev Adrenaline   Dream: Fast Builds
                             Thank you


Common 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
Motivation
                                   TLB    Problem that we solved
                         Dev Adrenaline   Dream: Fast Builds
                             Thank you


Common 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
Motivation
                                   TLB    Problem that we solved
                         Dev Adrenaline   Dream: Fast Builds
                             Thank you


Common 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
Motivation
                                  TLB        Problem that we solved
                        Dev Adrenaline       Dream: Fast Builds
                            Thank you


Optimal 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
Motivation   Introducing TLB
                                 TLB    Concepts in TLB
                       Dev Adrenaline   Show me the code honey!
                           Thank you    Hooking TLB up with your build process


Outline

  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
Motivation   Introducing TLB
                                 TLB    Concepts in TLB
                       Dev Adrenaline   Show me the code honey!
                           Thank you    Hooking TLB up with your build process


What 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
Motivation   Introducing TLB
                                 TLB    Concepts in TLB
                       Dev Adrenaline   Show me the code honey!
                           Thank you    Hooking TLB up with your build process


What 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
Motivation   Introducing TLB
                                 TLB    Concepts in TLB
                       Dev Adrenaline   Show me the code honey!
                           Thank you    Hooking TLB up with your build process


What 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
Motivation   Introducing TLB
                                 TLB    Concepts in TLB
                       Dev Adrenaline   Show me the code honey!
                           Thank you    Hooking TLB up with your build process


For 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
Motivation   Introducing TLB
                                 TLB    Concepts in TLB
                       Dev Adrenaline   Show me the code honey!
                           Thank you    Hooking TLB up with your build process


For 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
Motivation   Introducing TLB
                                 TLB    Concepts in TLB
                       Dev Adrenaline   Show me the code honey!
                           Thank you    Hooking TLB up with your build process


For 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
Motivation   Introducing TLB
                                 TLB    Concepts in TLB
                       Dev Adrenaline   Show me the code honey!
                           Thank you    Hooking TLB up with your build process


For 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
Motivation   Introducing TLB
                           TLB    Concepts in TLB
                 Dev Adrenaline   Show me the code honey!
                     Thank you    Hooking TLB up with your build process


Setup
Typical Setup




                Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation   Introducing TLB
                                     TLB    Concepts in TLB
                           Dev Adrenaline   Show me the code honey!
                               Thank you    Hooking TLB up with your build process


Setup
Alien Environment Setup




                          Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation   Introducing TLB
                                       TLB    Concepts in TLB
                             Dev Adrenaline   Show me the code honey!
                                 Thank you    Hooking TLB up with your build process


Communication
Server-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
Motivation   Introducing TLB
                                       TLB    Concepts in TLB
                             Dev Adrenaline   Show me the code honey!
                                 Thank you    Hooking TLB up with your build process


Communication
Server-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
Motivation   Introducing TLB
                                       TLB    Concepts in TLB
                             Dev Adrenaline   Show me the code honey!
                                 Thank you    Hooking TLB up with your build process


Communication
Server-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
Motivation   Introducing TLB
                                       TLB    Concepts in TLB
                             Dev Adrenaline   Show me the code honey!
                                 Thank you    Hooking TLB up with your build process


Communication
Server-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
Motivation   Introducing TLB
                                       TLB    Concepts in TLB
                             Dev Adrenaline   Show me the code honey!
                                 Thank you    Hooking TLB up with your build process


Communication
Server-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
Motivation   Introducing TLB
                                       TLB    Concepts in TLB
                             Dev Adrenaline   Show me the code honey!
                                 Thank you    Hooking TLB up with your build process


Communication
Server-Client-Runner Talk


                                                             Step 6
                                              Terminate gracefully; build
                                                    task returns




                            Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation   Introducing TLB
                                  TLB    Concepts in TLB
                        Dev Adrenaline   Show me the code honey!
                            Thank you    Hooking TLB up with your build process


Ok 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
Motivation   Introducing TLB
                                 TLB    Concepts in TLB
                       Dev Adrenaline   Show me the code honey!
                           Thank you    Hooking TLB up with your build process


Outline

  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
Motivation       Introducing TLB
                                                    TLB        Concepts in TLB
                                          Dev Adrenaline       Show me the code honey!
                                              Thank you        Hooking TLB up with your build process


TLB Client
the 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
Motivation       Introducing TLB
                                                    TLB        Concepts in TLB
                                          Dev Adrenaline       Show me the code honey!
                                              Thank you        Hooking TLB up with your build process


TLB Client
the 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
Motivation       Introducing TLB
                                                    TLB        Concepts in TLB
                                          Dev Adrenaline       Show me the code honey!
                                              Thank you        Hooking TLB up with your build process


TLB Client
the 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
Motivation   Introducing TLB
                                       TLB    Concepts in TLB
                             Dev Adrenaline   Show me the code honey!
                                 Thank you    Hooking TLB up with your build process


TLB Client
Balancer



                          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
Motivation       Introducing TLB
                                       TLB        Concepts in TLB
                             Dev Adrenaline       Show me the code honey!
                                 Thank you        Hooking TLB up with your build process


TLB Client
Balancer




                           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
Motivation        Introducing TLB
                                                   TLB         Concepts in TLB
                                         Dev Adrenaline        Show me the code honey!
                                             Thank you         Hooking TLB up with your build process


TLB Client
Balancer


                        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
Motivation   Introducing TLB
                                      TLB    Concepts in TLB
                            Dev Adrenaline   Show me the code honey!
                                Thank you    Hooking TLB up with your build process


TLB Client
Balancer



                         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
Motivation        Introducing TLB
                                           TLB         Concepts in TLB
                                 Dev Adrenaline        Show me the code honey!
                                     Thank you         Hooking TLB up with your build process


TLB Client
Balancer


                                   *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
Motivation         Introducing TLB
                                      TLB          Concepts in TLB
                            Dev Adrenaline         Show me the code honey!
                                Thank you          Hooking TLB up with your build process


TLB Client
Orderer




                           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
Motivation        Introducing TLB
                                          TLB         Concepts in TLB
                                Dev Adrenaline        Show me the code honey!
                                    Thank you         Hooking TLB up with your build process


TLB Client
Orderer



                                    *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
Motivation        Introducing TLB
                                                    TLB         Concepts in TLB
                                          Dev Adrenaline        Show me the code honey!
                                              Thank you         Hooking TLB up with your build process


TLB Client
Correctness 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
Motivation   Introducing TLB
                                 TLB    Concepts in TLB
                       Dev Adrenaline   Show me the code honey!
                           Thank you    Hooking TLB up with your build process


Outline

  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
Motivation   Introducing TLB
                                TLB    Concepts in TLB
                      Dev Adrenaline   Show me the code honey!
                          Thank you    Hooking TLB up with your build process




TLB 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
Motivation   Introducing TLB
                                TLB    Concepts in TLB
                      Dev Adrenaline   Show me the code honey!
                          Thank you    Hooking TLB up with your build process




TLB 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
Motivation   Introducing TLB
                                TLB    Concepts in TLB
                      Dev Adrenaline   Show me the code honey!
                          Thank you    Hooking TLB up with your build process




TLB 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
Motivation   Introducing TLB
                                 TLB    Concepts in TLB
                       Dev Adrenaline   Show me the code honey!
                           Thank you    Hooking TLB up with your build process


Outline

  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
Motivation   Introducing TLB
                             TLB    Concepts in TLB
                   Dev Adrenaline   Show me the code honey!
                       Thank you    Hooking TLB up with your build process


Leverage parallel execution capabilities of
tools like...




                  Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation   Introducing TLB
                                TLB    Concepts in TLB
                      Dev Adrenaline   Show me the code honey!
                          Thank you    Hooking TLB up with your build process


or 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
Motivation   Introducing TLB
                                TLB    Concepts in TLB
                      Dev Adrenaline   Show me the code honey!
                          Thank you    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 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
Motivation   Introducing TLB
                                TLB    Concepts in TLB
                      Dev Adrenaline   Show me the code honey!
                          Thank you    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 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
Motivation   Introducing TLB
                                TLB    Concepts in TLB
                      Dev Adrenaline   Show me the code honey!
                          Thank you    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 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
Motivation   Introducing TLB
                                TLB    Concepts in TLB
                      Dev Adrenaline   Show me the code honey!
                          Thank you    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 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
Motivation   Introducing TLB
                                TLB    Concepts in TLB
                      Dev Adrenaline   Show me the code honey!
                          Thank you    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 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
Motivation   Introducing TLB
                                 TLB    Concepts in TLB
                       Dev Adrenaline   Show me the code honey!
                           Thank you    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 and
  patchset)




                      Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation   Introducing TLB
                                  TLB    Concepts in TLB
                        Dev Adrenaline   Show me the code honey!
                            Thank you    Hooking TLB up with your build process


We 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
Motivation   Introducing TLB
                                 TLB    Concepts in TLB
                       Dev Adrenaline   Show me the code honey!
                           Thank you    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 to
                          contribute :-)




                      Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation   Introducing TLB
                                 TLB    Concepts in TLB
                       Dev Adrenaline   Show me the code honey!
                           Thank you    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 to
                          contribute :-)




                      Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation   Introducing TLB
                                 TLB    Concepts in TLB
                       Dev Adrenaline   Show me the code honey!
                           Thank you    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 to
                          contribute :-)




                      Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation
                                 TLB
                                        Polynomial Time Set-Partitioning
                       Dev Adrenaline
                           Thank you


Outline

  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
Motivation
                                TLB
                                       Polynomial Time Set-Partitioning
                      Dev Adrenaline
                          Thank you


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 in
     CommonLisp, needs some more tuning)




                     Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation
                                  TLB
                                         Polynomial Time Set-Partitioning
                        Dev Adrenaline
                            Thank you


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
Motivation
                                      TLB
                                             Polynomial Time Set-Partitioning
                            Dev Adrenaline
                                Thank you


Keep 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
Motivation
                                          TLB
                                                 Polynomial Time Set-Partitioning
                                Dev Adrenaline
                                    Thank you


Random numbers
0 < n < 10000; 10 generations




                           Pavan, Janmejay       TLB - http://test-load-balancer.github.com
Motivation
                                      TLB
                                             Polynomial Time Set-Partitioning
                            Dev Adrenaline
                                Thank you


Random numbers
0 < n < 10000; 100 generations




                           Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation
                                      TLB
                                             Polynomial Time Set-Partitioning
                            Dev Adrenaline
                                Thank you


Random numbers
0 < n < 10000; 1000 generations




                           Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation
                                      TLB
                                             Polynomial Time Set-Partitioning
                            Dev Adrenaline
                                Thank you


Random numbers
0 < n < 10000; 10000 generations




                           Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation
                                    TLB
                                           Polynomial Time Set-Partitioning
                          Dev Adrenaline
                              Thank you


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




                         Pavan, Janmejay   TLB - http://test-load-balancer.github.com
Motivation
                                TLB
                      Dev Adrenaline
                          Thank you


Thank 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

Weitere ähnliche Inhalte

Andere mochten auch

Translation lookaside buffer
Translation lookaside bufferTranslation lookaside buffer
Translation lookaside bufferChetan Mahawar
 
Memory mapping techniques and low power memory design
Memory mapping techniques and low power memory designMemory mapping techniques and low power memory design
Memory mapping techniques and low power memory designUET Taxila
 
INTEL 80386 MICROPROCESSOR
INTEL  80386  MICROPROCESSORINTEL  80386  MICROPROCESSOR
INTEL 80386 MICROPROCESSORAnnies Minu
 
Implementation of page table
Implementation of page tableImplementation of page table
Implementation of page tableguestff64339
 
Microprocessor 80386
Microprocessor 80386Microprocessor 80386
Microprocessor 80386yash sawarkar
 
Cache memory
Cache memoryCache memory
Cache memoryAnuj Modi
 
Applications of 8051 microcontrollers
Applications of 8051 microcontrollersApplications of 8051 microcontrollers
Applications of 8051 microcontrollersDr.YNM
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller NotesDr.YNM
 
這一晚在部落閱讀空間遇見你991120
這一晚在部落閱讀空間遇見你991120這一晚在部落閱讀空間遇見你991120
這一晚在部落閱讀空間遇見你991120瑞明 許
 
British Council Talk
British Council TalkBritish Council Talk
British Council Talkseaninchina
 
CSH Presentation
CSH PresentationCSH Presentation
CSH Presentationmjmick
 
Presentation1 updated1
Presentation1 updated1Presentation1 updated1
Presentation1 updated1Anas Edreesi
 
20090416 Allami Tamogatas Es Kozbeszerzes
20090416 Allami Tamogatas Es Kozbeszerzes20090416 Allami Tamogatas Es Kozbeszerzes
20090416 Allami Tamogatas Es Kozbeszerzesgaalnorb
 
Christopher hills-victor-beasely--your-electro vibratory-body
Christopher hills-victor-beasely--your-electro vibratory-bodyChristopher hills-victor-beasely--your-electro vibratory-body
Christopher hills-victor-beasely--your-electro vibratory-bodyganesha1963
 

Andere mochten auch (20)

Translation lookaside buffer
Translation lookaside bufferTranslation lookaside buffer
Translation lookaside buffer
 
Mapping
MappingMapping
Mapping
 
Memory mapping techniques and low power memory design
Memory mapping techniques and low power memory designMemory mapping techniques and low power memory design
Memory mapping techniques and low power memory design
 
Memory Mapping Cache
Memory Mapping CacheMemory Mapping Cache
Memory Mapping Cache
 
I o ports.ppt
I o ports.pptI o ports.ppt
I o ports.ppt
 
INTEL 80386 MICROPROCESSOR
INTEL  80386  MICROPROCESSORINTEL  80386  MICROPROCESSOR
INTEL 80386 MICROPROCESSOR
 
Implementation of page table
Implementation of page tableImplementation of page table
Implementation of page table
 
Microprocessor 80386
Microprocessor 80386Microprocessor 80386
Microprocessor 80386
 
Cache memory
Cache memoryCache memory
Cache memory
 
Applications of 8051 microcontrollers
Applications of 8051 microcontrollersApplications of 8051 microcontrollers
Applications of 8051 microcontrollers
 
Cache memory presentation
Cache memory presentationCache memory presentation
Cache memory presentation
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller Notes
 
這一晚在部落閱讀空間遇見你991120
這一晚在部落閱讀空間遇見你991120這一晚在部落閱讀空間遇見你991120
這一晚在部落閱讀空間遇見你991120
 
MYOB Hosting
MYOB HostingMYOB Hosting
MYOB Hosting
 
British Council Talk
British Council TalkBritish Council Talk
British Council Talk
 
CSH Presentation
CSH PresentationCSH Presentation
CSH Presentation
 
Presentation1 updated1
Presentation1 updated1Presentation1 updated1
Presentation1 updated1
 
Fallas
FallasFallas
Fallas
 
20090416 Allami Tamogatas Es Kozbeszerzes
20090416 Allami Tamogatas Es Kozbeszerzes20090416 Allami Tamogatas Es Kozbeszerzes
20090416 Allami Tamogatas Es Kozbeszerzes
 
Christopher hills-victor-beasely--your-electro vibratory-body
Christopher hills-victor-beasely--your-electro vibratory-bodyChristopher hills-victor-beasely--your-electro vibratory-body
Christopher hills-victor-beasely--your-electro vibratory-body
 

Ähnlich wie TLB - rocket booster for your build

Ntd2015_pt_kanban_ppt
Ntd2015_pt_kanban_pptNtd2015_pt_kanban_ppt
Ntd2015_pt_kanban_pptJokin Aspiazu
 
Serverless Operations aka. LessOps
Serverless Operations aka. LessOpsServerless Operations aka. LessOps
Serverless Operations aka. LessOpsRowan Udell
 
Re-imaginging CakePHP
Re-imaginging CakePHPRe-imaginging CakePHP
Re-imaginging CakePHPGraham Weldon
 
AATC - Gamifying DevOps with Lego and Chocolate Game
AATC - Gamifying DevOps with Lego and Chocolate GameAATC - Gamifying DevOps with Lego and Chocolate Game
AATC - Gamifying DevOps with Lego and Chocolate GameDana Pylayeva
 
Tdd final submission
Tdd final submissionTdd final submission
Tdd final submissionharshit040591
 
Sql server baselines
Sql server baselinesSql server baselines
Sql server baselinesMike Walsh
 
SysAdmin to SRE: Solving the Last Mile Problem
SysAdmin to SRE: Solving the Last Mile ProblemSysAdmin to SRE: Solving the Last Mile Problem
SysAdmin to SRE: Solving the Last Mile ProblemRundeck
 
Devops hot or not - bridging the gap between dev and ops
Devops   hot or not - bridging the gap between dev and opsDevops   hot or not - bridging the gap between dev and ops
Devops hot or not - bridging the gap between dev and opsXebiaLabs
 
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)Dinis Cruz
 
How Gozengo Implemented a Continuous Deployment Culture from Day One
How Gozengo Implemented a Continuous Deployment Culture from Day OneHow Gozengo Implemented a Continuous Deployment Culture from Day One
How Gozengo Implemented a Continuous Deployment Culture from Day OneSauce Labs
 
Gozengo sauce presentation
Gozengo sauce presentationGozengo sauce presentation
Gozengo sauce presentationDaniel Straus
 
Kanban & Organizational Maturity
Kanban & Organizational MaturityKanban & Organizational Maturity
Kanban & Organizational MaturityDavid Anderson
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroPaul Boos
 
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...OW2
 
Agile Gurgaon 2016 | Thinking Beyond :: Marry Agile and DevOps for Phenomenal...
Agile Gurgaon 2016 | Thinking Beyond :: Marry Agile and DevOps for Phenomenal...Agile Gurgaon 2016 | Thinking Beyond :: Marry Agile and DevOps for Phenomenal...
Agile Gurgaon 2016 | Thinking Beyond :: Marry Agile and DevOps for Phenomenal...AgileNetwork
 
有了 Agile,為什麼還要有 DevOps?
有了 Agile,為什麼還要有 DevOps?有了 Agile,為什麼還要有 DevOps?
有了 Agile,為什麼還要有 DevOps?William Yeh
 
Story Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkStory Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkOleksiy Rezchykov
 

Ähnlich wie TLB - rocket booster for your build (20)

Ntd2015_pt_kanban_ppt
Ntd2015_pt_kanban_pptNtd2015_pt_kanban_ppt
Ntd2015_pt_kanban_ppt
 
Serverless Operations aka. LessOps
Serverless Operations aka. LessOpsServerless Operations aka. LessOps
Serverless Operations aka. LessOps
 
Re-imaginging CakePHP
Re-imaginging CakePHPRe-imaginging CakePHP
Re-imaginging CakePHP
 
AATC - Gamifying DevOps with Lego and Chocolate Game
AATC - Gamifying DevOps with Lego and Chocolate GameAATC - Gamifying DevOps with Lego and Chocolate Game
AATC - Gamifying DevOps with Lego and Chocolate Game
 
DevOps Game at SGZA
DevOps Game at SGZADevOps Game at SGZA
DevOps Game at SGZA
 
Tdd final submission
Tdd final submissionTdd final submission
Tdd final submission
 
Sql server baselines
Sql server baselinesSql server baselines
Sql server baselines
 
DevOps
DevOpsDevOps
DevOps
 
SysAdmin to SRE: Solving the Last Mile Problem
SysAdmin to SRE: Solving the Last Mile ProblemSysAdmin to SRE: Solving the Last Mile Problem
SysAdmin to SRE: Solving the Last Mile Problem
 
Devops hot or not - bridging the gap between dev and ops
Devops   hot or not - bridging the gap between dev and opsDevops   hot or not - bridging the gap between dev and ops
Devops hot or not - bridging the gap between dev and ops
 
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
 
How Gozengo Implemented a Continuous Deployment Culture from Day One
How Gozengo Implemented a Continuous Deployment Culture from Day OneHow Gozengo Implemented a Continuous Deployment Culture from Day One
How Gozengo Implemented a Continuous Deployment Culture from Day One
 
Gozengo sauce presentation
Gozengo sauce presentationGozengo sauce presentation
Gozengo sauce presentation
 
Kanban & Organizational Maturity
Kanban & Organizational MaturityKanban & Organizational Maturity
Kanban & Organizational Maturity
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for Distro
 
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...
 
Agile Gurgaon 2016 | Thinking Beyond :: Marry Agile and DevOps for Phenomenal...
Agile Gurgaon 2016 | Thinking Beyond :: Marry Agile and DevOps for Phenomenal...Agile Gurgaon 2016 | Thinking Beyond :: Marry Agile and DevOps for Phenomenal...
Agile Gurgaon 2016 | Thinking Beyond :: Marry Agile and DevOps for Phenomenal...
 
有了 Agile,為什麼還要有 DevOps?
有了 Agile,為什麼還要有 DevOps?有了 Agile,為什麼還要有 DevOps?
有了 Agile,為什麼還要有 DevOps?
 
Story Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkStory Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium Framework
 
Ansible testing
Ansible testingAnsible testing
Ansible testing
 

Kürzlich hochgeladen

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Kürzlich hochgeladen (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

TLB - rocket booster for your build

  • 1. Motivation TLB Dev Adrenaline Thank you TLB rocket booster for your build Pavan 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 you TLB 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 you Whats 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 you Outline 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 you Outline 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 Story Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 7. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank you 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
  • 8. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank you 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
  • 9. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank you to... Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 10. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank you to... Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 11. Motivation TLB Problem that we solved Dev Adrenaline Dream: Fast Builds Thank you With just a few lines changed in the build script & executing tests parallely. The longish build ’firefox’ split into 16 partitions to executed parallely 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 you With just a few lines changed in the build script & executing tests parallely. The longish build ’firefox’ split into 16 partitions to executed parallely 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 you Outline 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 you Fast build = Rapid development Devs spend less time waiting to checkin Need not be limited to unit/integration tests Functional/Acceptance tests Easier for devs to run precommit builds - Results in pulling upstream 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 you Fast build = Rapid development Devs spend less time waiting to checkin Need not be limited to unit/integration tests Functional/Acceptance tests Easier for devs to run precommit builds - Results in pulling upstream 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 you Fast build = Rapid development Devs spend less time waiting to checkin Need not be limited to unit/integration tests Functional/Acceptance tests Easier for devs to run precommit builds - Results in pulling upstream 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 you Also 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 you Also 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 you Also 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 you Common 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 you Common 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 you Common 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 you Common 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 you Common 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 you Common 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 you Common 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 you Common 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 you Optimal 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 process Outline 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 process What 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 process What 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 process What 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 process For 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 process For 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 process For 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 process For 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 process Setup Typical 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 process Setup Alien 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 process Communication Server-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 process Communication Server-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 process Communication Server-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 process Communication Server-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 process Communication Server-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 process Communication Server-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 process Ok 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 process Outline 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 process TLB Client the 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 process TLB Client the 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 process TLB Client the 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 process TLB Client Balancer 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 process TLB Client Balancer 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 process TLB Client Balancer 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 process TLB Client Balancer 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 process TLB Client Balancer *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 process TLB Client Orderer 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 process TLB Client Orderer *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 process TLB Client Correctness 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 process Outline 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 process TLB 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 process TLB 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 process TLB 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 process Outline 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 process Leverage parallel execution capabilities of tools 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 process or 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 process Supported 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 process Supported 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 process Supported 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 process Supported 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 process Supported 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 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 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 process We 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 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 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 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 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 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 to contribute :-) Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 75. Motivation TLB Polynomial Time Set-Partitioning Dev Adrenaline Thank you Outline 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 you 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 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 you 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
  • 78. Motivation TLB Polynomial Time Set-Partitioning Dev Adrenaline Thank you Keep 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 you Random numbers 0 < n < 10000; 10 generations Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 80. Motivation TLB Polynomial Time Set-Partitioning Dev Adrenaline Thank you Random numbers 0 < n < 10000; 100 generations Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 81. Motivation TLB Polynomial Time Set-Partitioning Dev Adrenaline Thank you Random numbers 0 < n < 10000; 1000 generations Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 82. Motivation TLB Polynomial Time Set-Partitioning Dev Adrenaline Thank you Random numbers 0 < n < 10000; 10000 generations Pavan, Janmejay TLB - http://test-load-balancer.github.com
  • 83. Motivation TLB Polynomial Time Set-Partitioning Dev Adrenaline Thank you Band distribution of numbers 0 < 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 you Thank 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