-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Speedup lang-painless tests #605
Conversation
Painless tests would previously create script engine for every single test method. Now the tests that need to tweak script engine settings create a class level fixture (BeforeClass/AfterClass) that is used across all the test methods in that suite. RegexLimitTests was split into two suites (limit=1 and limit=2) rather than dynamically applying different settings. C2 compiler is no longer needed for tests to be fast, instead tests run faster with C1 only as expected, like the rest of the unit tests. Signed-off-by: Robert Muir <rmuir@apache.org>
✅ Gradle Wrapper Validation success a0b5b27 |
✅ DCO Check Passed a0b5b27 |
✅ Gradle Precommit success a0b5b27 |
start gradle check |
Thanks @rmuir!!! These PRs are super important! Every performance improvement we can get with these tests are compounding productivity! |
@@ -26,7 +26,7 @@ | |||
*/ | |||
|
|||
/** | |||
* Lexer, parser, and tree {@link Walker} responsible for turning the code | |||
* Lexer, parser, and tree walker responsible for turning the code |
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.
fyi: these unrelated javadocs changes are just so that the module would compile in eclipse for me (it is picky by default about such stuff). I tried to avoid touching src/java in this PR, and I know eclipse is unsupported, but I use it for refactoring such as "rename method".
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.
LGTM! Thanks @rmuir
This has sat longer than it should've because of the release tagging. Merging and closing. |
Painless tests would previously create script engine for every single test method. Now the tests that need to tweak script engine settings create a class level fixture (BeforeClass/AfterClass) that is used across all the test methods in that suite. RegexLimitTests was split into two suites (limit=1 and limit=2) rather than dynamically applying different settings. C2 compiler is no longer needed for tests to be fast, instead tests run faster with C1 only as expected, like the rest of the unit tests. Signed-off-by: Robert Muir <rmuir@apache.org>
Painless tests would previously create script engine for every single test method. Now the tests that need to tweak script engine settings create a class level fixture (BeforeClass/AfterClass) that is used across all the test methods in that suite. RegexLimitTests was split into two suites (limit=1 and limit=2) rather than dynamically applying different settings. C2 compiler is no longer needed for tests to be fast, instead tests run faster with C1 only as expected, like the rest of the unit tests. Signed-off-by: Robert Muir <rmuir@apache.org>
* Added "smartcn" analyzer. Signed-off-by: pieper <mike.pieper@ser.de> * Adapted changelog. Signed-off-by: pieper <mike.pieper@ser.de> * Fixed license headers. Signed-off-by: pieper <mike.pieper@ser.de> * Fixed release number. Signed-off-by: pieper <mike.pieper@ser.de> --------- Signed-off-by: pieper <mike.pieper@ser.de>
This PR follows up on #580 to fix performance issues with
lang-painless
tests.There are ~1000 painless test methods and each one was inefficiently creating a new script engine (re-parsing whitelists and such).
On my machine the change gives ~ 2x speedup for the
lang-painless
tests.Now the tests that need to tweak script engine settings create a class level fixture (BeforeClass/AfterClass) that is used across all the test methods in that suite. It is also a conceptual simplification: all the test methods within a file use the same settings.
RegexLimitTests was split into two suites (limit=1 and limit=2) rather than dynamically applying different settings.
C2 compiler is no longer needed for tests to be fast, instead tests runfaster with C1 only as expected, like the rest of the unit tests.
Signed-off-by: Robert Muir rmuir@apache.org