Giter Club home page Giter Club logo

Comments (3)

prostko avatar prostko commented on July 23, 2024

Also, thanks a lot! Love the project!

More than happy to submit a PR if this is interesting

from knapsack.

ArturT avatar ArturT commented on July 23, 2024

Hi @prostko

Sounds like an interesting idea.

If you would like to work on this you can take a look at
Knapsack::Distributors::ReportDistributor takes care of sorting test files with known time execution (test files in JSON report).
https://github.com/ArturT/knapsack/blob/387181ed7a459557770514c676771eff27dc3e1f/lib/knapsack/allocator.rb#L8
https://github.com/ArturT/knapsack/blob/387181ed7a459557770514c676771eff27dc3e1f/lib/knapsack/distributors/report_distributor.rb#L3

Knapsack::Distributors::LeftoverDistributor takes care of test files with unknown time execution (for instance someone added a new test file and it is not yet in JSON report - this file is called leftover).

List of test files for a given node index from ReportDistributor + LeftoverDistributor are passed to RSpec as allocator.stringify_node_tests
https://github.com/ArturT/knapsack/blob/387181ed7a459557770514c676771eff27dc3e1f/lib/knapsack/runners/rspec_runner.rb#L15 (it looks similar for other runners like cucumber, minitest, etc)

dynamic tests split

A bit similar idea to Least Connections Algorithm you can find in Knapsack Pro Queue Mode that will dynamically split tests between parallel nodes. This way you solve problems when nodes start at a different times or test files have random execution time.

You can check this article https://docs.knapsackpro.com/2020/how-to-speed-up-ruby-and-javascript-tests-with-ci-parallelisation

from knapsack.

ArturT avatar ArturT commented on July 23, 2024

I'm closing this issue because #99 was merged.

from knapsack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.