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
Issue #14599: Create performance regression test CI #14754
Conversation
.ci/baseline.benchmark
Outdated
Execution Time: 8.50 s | ||
============================================================ | ||
===================== BENCHMARK SUMMARY ==================== | ||
Average Execution Time: 8.56 s |
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 baseline file is generated by the shell script and is parsable by the same shell script. So whenever we want to change the baseline, we can use the same tool to generate this.
@@ -19,7 +19,7 @@ | |||
<module name="RegexpOnFilename"> | |||
<property name="id" value="executablesLocation"/> | |||
<property name="folderPattern" value="[\\/].ci([\\/]|$)"/> | |||
<property name="fileNamePattern" value="\.(bat|cmd|groovy|sh|md)$"/> | |||
<property name="fileNamePattern" value="\.(bat|cmd|groovy|sh|md|benchmark)$"/> |
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.
Exclude benchmark
files since they must are located in .ci
folder but are not executable.
.ci/check-performance-regression.sh
Outdated
} | ||
|
||
# parse baseline benchmark | ||
BASELINE=($(parse_benchmark_result "./.ci/baseline.benchmark")) |
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.
We may want to read the baseline from the master
branch later after this purposal is accepted.
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.
Items
d2a87dc
to
8e4fd8b
Compare
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.
Items
ae85131
to
cb8ef90
Compare
Hi @romani, could you please take a look at the failing CI Caused by: java.lang.RuntimeException: Cannot convert '#{env['CI'] == null ? 'ON_DEMAND' : 'ALWAYS'}' to PublishMode, valid values are 'ON_DEMAND', 'ON_FAILURE', 'ALWAYS'
at com.gradle.maven.common.configuration.q$b.g (SourceFile:582)
at com.gradle.maven.common.configuration.q$b.lambda$migrateOldPublishElement$8 (SourceFile:532)
at java.util.Optional.ifPresent (Optional.java:178) I don't think I've changed anything that is related to this CI failing, and the log doesn't really make sense to me. |
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.
Ignore xwiki for now
Good job. Last item:
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.
Thanks a lot, ok to merge
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.
Please do:
- Use
SECONDS
in all variable names that are time related, I've made some suggestions below. - Use consistent language for execution/run naming, I see no difference between the two in the context of this script.
- Show evidence of testing (prove that this will actually fail if we have an execution time that is an outlier). In order to do this, you can make a temporary commit that rebases this PR on the commit before we merged Issue #14566: Improve lexer performance #14568
Thanks for your response. It might take a little bit longer to apply all these changes than usual. I am having some final exams this week. I am still working on this. Sorry for the delay. |
No worries :) We are all busy people trying our best. Thanks for your contributions! |
4eed542
to
4a66796
Compare
2f18758
to
e86b762
Compare
|
@nrmancuso The CI fails in Lmh-java#6 as a test case. I checkout 3870875 (The commit before #14568), and cherry-picked #14754 for the test. |
@nrmancuso, by the way, do you think it would be better if we add a line of if: github.repository == 'checkstyle/checkstyle' to this workflow? so that we can make sure it only runs on our end, instead of on the developer ends. |
Yeah, we have done this in most others, I agree. |
e86b762
to
05d4265
Compare
Done |
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.
Last from me:
.ci/check-performance-regression.sh
Outdated
echo "Directory $SAMPLE_PROJECT DOES NOT exist." | exit 1 | ||
|
||
# add suppressions to config file | ||
sed -i '/ <!-- Filters -->/r ./config/projects-to-test/openjdk17-excluded.files' \ |
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.
Please extract this filename to a variable declared above with SAMPLE_PROJECT, etc., and do anything else to make it easy/obvious to update this script to run on any java version.
@Lmh-java how did we settle on 17, instead of 21?
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.
Please extract this filename to a variable declared above with SAMPLE_PROJECT, etc., and do anything else to make it easy/obvious to update this script to run on any java version.
Sure.
@Lmh-java how did we settle on 17, instead of 21?
I thought JDK 21 has more suppressions for latest syntax, which will consume more time. Since we are measuring the parsing time, this will make the benchmark slightly more inaccurate. So I decided to go with the JDK 17, since it contains relatively more parsable content, and we can avoid extra time consumed by a large amount of suppressions.
This is my reasoning. But if we want to go with JDK 21, it is also totally fine.
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.
I am good with 17 for now, just curious about why we did this.
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.
I am still working on #14779 right now. If that's merged, we can directly use that new property to skip all exceptions. That will be faster than a long list of suppressions :).
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.
Done
b3e43f1
to
183bafa
Compare
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.
Good stuff! Thanks a lot @Lmh-java this will be a big help during syntax updates.
Draft for Issue #14599