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
introduce Kotlinx Benchmark tests (copied from #763) #904
Conversation
…tmszdmsk) refactor test projects to be in separate directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty interesting, thanks for putting it together!
…seconds per test seems quite long, more iterations is better)
I added some additional tests for context, and used https://jmh.morethan.io/ to visualise the results. I don't think it's a surprise that the test without mocking/stubbing is very fast, but as commented here the stub decreases the operations, even though the stub isn't called. |
Yep makes sense, as discussed in #13 the most expensive part is actually creating stubs rather than using them. |
I think this PR can be merged in as-is. It's a good basis for future work, be it making the code better, or adding a GHA or visualizer plugin https://github.com/jzillmann/gradle-jmh-report |
Yep I think the next steps about this would be adding a GHA to monitor performances and track potential hits. Thanks a lot! |
copied from #763 - credit to @tmszdmsk!
I thought this was a good change, and I'm curious about investigating #13 and I think these benchmark tests can help.
I also refactored the existing 'client tests' to be in a new 'test modules' directory, because I think it's neater and more organised to have the test projects together, rather than mixed amongst the 'regular' projects.