-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
ESQL: Fix EvalBenchmark #124736
Conversation
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`.
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' |
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.
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); |
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 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); |
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.
The actual fix....
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
💔 Backport failed
You can use sqren/backport to manually backport by running |
Backport: #124922 |
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 forEVAL
ongradle check
.