Skip to content
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

ESQL: Fix EvalBenchmark #124736

Merged
merged 2 commits into from
Mar 14, 2025
Merged

ESQL: Fix EvalBenchmark #124736

merged 2 commits into from
Mar 14, 2025

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Mar 13, 2025

Fix the benchmark for EVAL which was failing because of a strange logging error. The benchmarks really didn't want to run when we use commons-logging. That's fine - we can use the ES logging facade thing. I also added a test to the benchmarks which should run the self-tests for EVAL on gradle check.

Fix the benchmark for `EVAL` which was failing because of a strange
logging error. The benchmarks really didn't want to run when we use
commons-logging. That's fine - we can use the ES logging facade thing. I
also added a test to the benchmarks which should run the self-tests for
`EVAL` on `gradle check`.
@nik9000 nik9000 added >non-issue auto-backport Automatically create backport pull requests when merged :Analytics/ES|QL AKA ESQL v9.0.0 v9.1.0 labels Mar 13, 2025
@nik9000 nik9000 requested a review from bpintea March 13, 2025 12:32
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Mar 13, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@@ -52,8 +51,10 @@ dependencies {
api "org.openjdk.jmh:jmh-core:$versions.jmh"
annotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:$versions.jmh"
// Dependencies of JMH
runtimeOnly 'net.sf.jopt-simple:jopt-simple:5.0.4'
runtimeOnly 'net.sf.jopt-simple:jopt-simple:5.0.2'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this the tests don't start. It doesn't seem to hurt jmh. If it's trouble later we can deal with it.

try {
for (String operation : EvalBenchmark.class.getField("operation").getAnnotationsByType(Param.class)[0].value()) {
log.info("self testing {}", operation);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to log something to make sure the tests really do something. I figured keeping it in the real benchmark wouldn't hurt. I did have to do the configureESLogging stuff to make it work though.

@@ -128,7 +128,7 @@ public ExpressionEvaluator.Factory toEvaluator(ToEvaluator toEvaluator) {

public abstract static class AbstractEvaluator implements EvalOperator.ExpressionEvaluator {

private static final Log logger = LogFactory.getLog(AbstractEvaluator.class);
private static final Logger logger = LogManager.getLogger(AbstractEvaluator.class);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual fix....

Copy link
Contributor

@bpintea bpintea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nik9000 nik9000 enabled auto-merge (squash) March 14, 2025 19:16
@nik9000 nik9000 merged commit 7ac6e5f into elastic:main Mar 14, 2025
16 of 17 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
9.0 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 124736

@nik9000
Copy link
Member Author

nik9000 commented Mar 14, 2025

Backport: #124922

nik9000 added a commit to nik9000/elasticsearch that referenced this pull request Mar 14, 2025
Fix the benchmark for `EVAL` which was failing because of a strange
logging error. The benchmarks really didn't want to run when we use
commons-logging. That's fine - we can use the ES logging facade thing. I
also added a test to the benchmarks which should run the self-tests for
`EVAL` on `gradle check`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged backport pending >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.0.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants