Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bounty: parallel mocha #71

Open
8 tasks
lonerapier opened this issue Aug 30, 2024 · 7 comments
Open
8 tasks

bounty: parallel mocha #71

lonerapier opened this issue Aug 30, 2024 · 7 comments
Labels
bounty these are good issues for contributors and are eligible for cash bounties enhancement New feature or request tests Make sure thing work good

Comments

@lonerapier
Copy link
Collaborator

lonerapier commented Aug 30, 2024

Bounty description

Implement and optimize the use of the mocha --parallel flag to improve test execution times in the Extractor repository. Initial impressions suggest a 30-40% improvement in test execution time. However, the current implementation fails for multiple tests due to async issues.

Implementation requirements

  • Analyze current test suite to identify tests that fail when run in parallel
  • If needed, refactor failing tests to use deep copies of inputs instead of in-place updates and implement a method to consistently create deep copies of test inputs
  • Modify the test runner config to use the '--parallel' flag
  • Ensure all tests pass when run in parallel
  • Update .mocharc (as necessary) and README with instructions on how to run tests in parallel. Tests should default to being ran in parallel with npx mocha

Bonus features

  • Measure and document performance improvement achieved by parallel execution
  • Clean up the test modules to be more readable on both test output and the TypeScript itself. E.g., make functions like generatePassCase and executeCodegen generic and move them to common/index.ts
  • Ensure that the CI test job runs tests both in parallel and works properly (no false-negatives or false-positives)

Resources

Mocha Parallel Tests Documentation
JavaScript Deep Copy Techniques
Async/Await Best Practices

Criteria

For timely submissions of bounties that meet the implementation requirements, a bounty of at least $250 will be awarded to the contributor. Additional bounty amounts are available and will be rewarded based on the following criteria:

  1. Completion of any of the bonus features listed above and/or other bonus features that improve the quality of the submission.
  2. Correctness and security: A thorough review of the implementation should convince our team that they are correct and secure, with all requirements met.
  3. Code clarity and quality: Succinct, easy-to-follow code with appropriate naming conventions. Utilize Rust’s type system for flexibility and security (e.g., compile-time checks where possible), and avoid external crates. Optimizations should be a lower priority than clarity, but can be included behind a feature flag as a bonus.
  4. Documentation quality: Provide comprehensive README’s, Cargo docs, and inline comments where code itself is not self-explanatory. Prioritize clarity and readability.
@Autoparallel Autoparallel added enhancement New feature or request tests Make sure thing work good labels Sep 9, 2024
@brunny-eth brunny-eth added the bounty these are good issues for contributors and are eligible for cash bounties label Sep 10, 2024
@brunny-eth brunny-eth changed the title test: parallel mocha Bounty: parallel mocha Sep 10, 2024
@pluto pluto deleted a comment from Autoparallel Sep 10, 2024
@brunny-eth brunny-eth changed the title Bounty: parallel mocha bounty: parallel mocha Sep 11, 2024
@brunny-eth brunny-eth pinned this issue Sep 11, 2024
@pluto pluto deleted a comment from brunny-eth Sep 11, 2024
@aybanda
Copy link

aybanda commented Sep 12, 2024

@lonerapier
I'm intersted in solving this, can you assign this to me?

@Autoparallel
Copy link
Contributor

@aybanda can you pick one of the two issues you've commented on and go with that? Let's just assign one bounty per one person for now :)

The other one is higher prio in my opinion.

@omarsoufiane
Copy link

hello @lonerapier , you can create a bounty on Bountyhub, it's integrated into github, (a bot will comment to let other people know that there is a bounty) and if no one solves your bounty you can retract it and get your money back, it's a simple process where you import issues by pasting the issue URL and the payment is upfront so that developers attempting to solve the issue know that the amount is already available.

@Autoparallel
Copy link
Contributor

hello @lonerapier , you can create a bounty on Bountyhub, it's integrated into github, (a bot will comment to let other people know that there is a bounty) and if no one solves your bounty you can retract it and get your money back, it's a simple process where you import issues by pasting the issue URL and the payment is upfront so that developers attempting to solve the issue know that the amount is already available.

@brunny-eth can you look into this?

@brunny-eth
Copy link
Contributor

thanks for the recommendation @omarsoufiane, we will consider using bountyhub in the future!

@nabby27
Copy link

nabby27 commented Oct 6, 2024

Another option is Opire

Disclaimer: I'm the cofounder xD

@brunny-eth
Copy link
Contributor

thanks all, we will reach out if we're interested in moving to a more tailored solution. for now we are good with the manual method that we are using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty these are good issues for contributors and are eligible for cash bounties enhancement New feature or request tests Make sure thing work good
Projects
None yet
Development

No branches or pull requests

6 participants