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

Optimize bashunit #228

Merged
merged 2 commits into from Nov 18, 2023
Merged

Optimize bashunit #228

merged 2 commits into from Nov 18, 2023

Conversation

antonio-gg-dev
Copy link
Member

@antonio-gg-dev antonio-gg-dev commented Nov 18, 2023

πŸ“š Description

By removing the call to the deprecated setUp/tearDown functions and modifying the implementation of the execute_function_if_exists and unset_if_exists helpers, I've managed to reduce the execution time of the library's own tests by around 15% in my local environment.

To calculate these times, I have been running the following script while making changes and taking an average of the times:

for i in {1..10}; do make test | grep "Time taken: " >> result_2_f; done

After all the changes, the results I have obtained from main vs this branch are as follows:
imagen

Removing the deprecations meant a reduction of about 5%, and modifying the implementation of the helpers accounted for the remaining 10% reduction.

πŸ”– Changes

  • Remove support to deprecated setUp/tearDown functions
  • Optimize test execution speed

βœ… To-do list

  • I updated the CHANGELOG.md to reflect the new feature or fix
  • I updated the documentation to reflect the changes

@antonio-gg-dev antonio-gg-dev self-assigned this Nov 18, 2023
@antonio-gg-dev antonio-gg-dev marked this pull request as ready for review November 18, 2023 13:17
@antonio-gg-dev antonio-gg-dev added the enhancement New feature or request label Nov 18, 2023
Copy link
Member

@Chemaclass Chemaclass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love it! Kudos!

@Chemaclass Chemaclass merged commit 6046d25 into main Nov 18, 2023
7 checks passed
@Chemaclass Chemaclass deleted the optimize-bashunit branch November 18, 2023 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants