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

[incubator-kie-issues#1300] Fix broken DMN benchmarks #287

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import org.kie.dmn.feel.FEEL;
import org.kie.dmn.feel.lang.CompiledExpression;
import org.kie.dmn.feel.lang.impl.FEELBuilder;
import org.kie.dmn.feel.parser.feel11.profiles.DoCompileFEELProfile;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
Expand All @@ -50,8 +51,8 @@ public abstract class AbstractFEELBenchmark {

@Setup()
public void setupFEEL() {
feelInterpreted = FEEL.newInstance();
feelCompiled = FEEL.newInstance(Collections.singletonList(new DoCompileFEELProfile()));
feelInterpreted = FEELBuilder.builder().build();
feelCompiled = FEELBuilder.builder().withProfiles(Collections.singletonList(new DoCompileFEELProfile())).build();
compiledJavaExpression = compileExpression(getExpression());
compiledButInterpretedExpression = compileInterpretedExpression(getExpression());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class EvaluationContextImplBenchmark {

@Setup()
public void setupFEEL() {
context = new EvaluationContextImpl(this.getClass().getClassLoader(), null);
context = new EvaluationContextImpl(this.getClass().getClassLoader(), null, null);
context.enterFrame();
context.enterFrame();
context.enterFrame();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class FEELAddExecutorBenchmark {
@Setup
public void setup() {
executor = AddExecutor.instance();
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null);
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null, null);
values = getObjectArray(argsType);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class FEELAndExecutorBenchmark {
@Setup
public void setup() {
executor = AndExecutor.instance();
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null);
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null, null);
values = getBooleanArray(args);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class FEELDivExecutorBenchmark {
@Setup
public void setup() {
executor = DivExecutor.instance();
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null);
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null, null);
values = getObjectArray(args);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class FEELEqExecutorBenchmark {
@Setup
public void setup() {
executor = EqExecutor.instance();
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null);
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null, null);
values = getBooleanArray(args);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class FEELGtExecutorBenchmark {
@Setup
public void setup() {
executor = GtExecutor.instance();
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null);
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null, null);
values = getBooleanArray(args);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class FEELGteExecutorBenchmark {
@Setup
public void setup() {
executor = GteExecutor.instance();
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null);
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null, null);
values = getBooleanArray(args);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class FEELLtExecutorBenchmark {
@Setup
public void setup() {
executor = LtExecutor.instance();
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null);
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null, null);
values = getBooleanArray(args);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class FEELLteExecutorBenchmark {
@Setup
public void setup() {
executor = LteExecutor.instance();
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null);
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null, null);
values = getBooleanArray(args);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class FEELMultExecutorBenchmark {
@Setup
public void setup() {
executor = MultExecutor.instance();
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null);
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null, null);
values = getObjectArray(args);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class FEELNeExecutorBenchmark {
@Setup
public void setup() {
executor = NeExecutor.instance();
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null);
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null, null);
values = getBooleanArray(args);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class FEELOrExecutorBenchmark {
@Setup
public void setup() {
executor = OrExecutor.instance();
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null);
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null, null);
values = getBooleanArray(args);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class FEELPowExecutorBenchmark {
@Setup
public void setup() {
executor = PowExecutor.instance();
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null);
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null, null);
values = getObjectArray(argsType);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class FEELSubExecutorBenchmark {
@Setup
public void setup() {
executor = SubExecutor.instance();
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null);
ctx = new EvaluationContextImpl(ClassLoaderUtil.findDefaultClassLoader(), null, null);
values = getObjectArray(argsType);
}

Expand Down
Loading