-
Notifications
You must be signed in to change notification settings - Fork 344
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
Unit test case performance #418
Comments
hey @cyrille-artho is there anything that i can start as of now & improve the perfomance . Thanks |
Hi, After you have added this, you can observe the time per unit test. I have tried this myself and saved the result in
Looks at tests that take a rather long time to execute. The 50 slowest tests (the output of the above command) are these:
Obviously, the three slowest tests add significantly to the execution time, so if there is something that can be simplified there, it will have an impact on the total time (and energy) used in future CI builds. |
Note that a slow test is not necessarily overly complex; perhaps it simply tests a feature that is quite slow in JPF. In that case, it would be great if such a feature could be optimized, but this is usually easier said than done. |
Hi @cyrille-artho, so based on your previous answer the way to increase the performance is to optimize the feature that takes a long time to test. so, In that case, we can boil it down to the classes & functions that are a bit slow in terms of execution & optimize those but as said earlier "this is usually easier said than done". |
Yes, to some extent. For each slow test, there are various possible outcomes:
The goal here is mostly to identify if some very slow tests fall into group 1; these are easy to "fix" by making their inputs smaller. The other cases are hard, but it can still be helpful to identify them, as this could be a future project (if a performance improvement seems feasible). |
hi @cyrille-artho, so what if we can list out the methods that are taking longer time in terms of execution & also verify your point as such if those methods having input parameters that are quite large affecting the time taken during execution . If possible we can take up the 3rd point mentioned above and make necessary changes if you agree. |
I think identifying and also simplifying tests that are "bigger" than necessary is the easiest way to find potential savings in test time. So I would try that first. Bottlenecks in JPF itself may be easy to identify, but they are usually hard to fix. |
sure @cyrille-artho , I am willing to contribute if you require any sort of small hand in fixing those issue I am glad to join with you. |
Hi @cyrille-artho , can i work on this issue ? i want to contribute to this , i have a knowledge of Unit testing. i read above threads and understood the problem of this issue. |
Yes, it seems that no one is working actively on this. However, I've made a quick check earlier, and it may not be possible to find an easy way to speed up the unit tests. I haven't looked at this in depth, though. |
With now a bit over 1000 unit tests, the CI runs start to take a bit more than just five minutes. Some tests appear slower than others. Without coverage information (see #417), we don't really know if we can easily drop a slow test. Some information on the slowest tests can help regardless, as they can perhaps be simplified or omitted.
The text was updated successfully, but these errors were encountered: