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:
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
[x] I updated the CHANGELOG.md to reflect the new feature or fix
[x] I updated the documentation to reflect the changes
📚 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:
After all the changes, the results I have obtained from main vs this branch are as follows:![imagen](https://github.com/TypedDevs/bashunit/assets/13595197/bfd51541-9d7e-411e-abad-62548628ecc0)
Removing the deprecations meant a reduction of about 5%, and modifying the implementation of the helpers accounted for the remaining 10% reduction.
🔖 Changes
✅ To-do list
CHANGELOG.md
to reflect the new feature or fix