-
Notifications
You must be signed in to change notification settings - Fork 19
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
CPU and Memory Utilisation #114
Comments
Support for running all/multiple BeforeEach and AfterEach methods is already available To limit CPU usage during the test you can use |
but what if the need any needs just totalExecutions=x (lightweight performance testing) In such min, performance needs
Not sure why JUnit has this.. even if this is a limitation now, hope they will be able to fix it in the future. |
May be good to talk about limiting CPU usage control in the comments of this code or rename
|
I'll add a note about CPU usage to the main readme page |
In my tests I have seen no out of memory but CPU has gone 100% multiple times and most times beyond 50% CPU
Maybe instead of using the fall loop to invoke the same test, do consider using of https://www.baeldung.com/junit-5-repeated-test so that the junit had the usual method to repeat the as now JUnitPerf not only handling repeat call in the for loop but also doing some work of following @beforeeach @AfterEach etc.. b.t.w JUnit 5 does support multiple methods with @beforeeach and @aftereach...
Using @RepeatedTest at least when junitperf spec says totalExecutions =x, then even JUnit 5 dashboard would also show x test has run x times etc..
Again, this suggestion of mine is meant for JUnitPerf to focus on performance aspects only not to repeat to follow junit 5 test running lifecycle as much as possible. The Close example is https://jmeter.apache.org/api/org/apache/jmeter/protocol/java/sampler/JUnitSampler.html which tests unit tests all externally.. In fact, this sampler only supports JUnit4 and JUnit3, not JUnit 5 yet.. hope someday that would be ready..
In short, depending on JUnitPerfTest Spec, can you think of adding repeat test annotation dynamically and let JUnithandle the rest.. and still would you be able to collect the time taken for latency
The text was updated successfully, but these errors were encountered: