diff --git a/drools-benchmarks-parent/drools-benchmarks/src/main/java/org/drools/benchmarks/turtle/runtime/AbstractSimpleRuntimeBenchmark.java b/drools-benchmarks-parent/drools-benchmarks/src/main/java/org/drools/benchmarks/turtle/runtime/AbstractSimpleRuntimeBenchmark.java index d013c02d..633de662 100644 --- a/drools-benchmarks-parent/drools-benchmarks/src/main/java/org/drools/benchmarks/turtle/runtime/AbstractSimpleRuntimeBenchmark.java +++ b/drools-benchmarks-parent/drools-benchmarks/src/main/java/org/drools/benchmarks/turtle/runtime/AbstractSimpleRuntimeBenchmark.java @@ -27,9 +27,9 @@ import java.util.concurrent.TimeUnit; import org.drools.benchmarks.turtle.runtime.generator.FactsGenerator; import org.drools.benchmarks.turtle.runtime.generator.ResourceGenerator; +import org.drools.model.codegen.ExecutableModelProject; import org.kie.api.KieBase; import org.kie.api.KieServices; -import org.kie.api.conf.KieBaseOption; import org.kie.api.io.KieResources; import org.kie.api.io.Resource; import org.kie.api.io.ResourceType; @@ -81,11 +81,8 @@ public void createKBase() { for (Resource resource : resources) { kieHelper.addResource(resource); } - kieBase = kieHelper.build(getKieBaseOptions()); - } - - protected KieBaseOption[] getKieBaseOptions() { - return new KieBaseOption[]{}; + kieBase = new KieHelper() + .build(ExecutableModelProject.class); } @Setup diff --git a/drools-benchmarks-parent/drools-benchmarks/src/main/java/org/drools/benchmarks/turtle/runtime/SimpleDummyFactsMatchRatioExpertBenchmark.java b/drools-benchmarks-parent/drools-benchmarks/src/main/java/org/drools/benchmarks/turtle/runtime/SimpleDummyFactsMatchRatioExpertBenchmark.java deleted file mode 100644 index d6754e5b..00000000 --- a/drools-benchmarks-parent/drools-benchmarks/src/main/java/org/drools/benchmarks/turtle/runtime/SimpleDummyFactsMatchRatioExpertBenchmark.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2016 Red Hat, Inc. and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.drools.benchmarks.turtle.runtime; - -import java.util.ArrayList; -import java.util.List; -import org.kie.api.runtime.KieSession; -import org.openjdk.jmh.annotations.Benchmark; -import org.openjdk.jmh.annotations.Param; - -public class SimpleDummyFactsMatchRatioExpertBenchmark extends AbstractSimpleRuntimeBenchmark { - - @Param({"400000"}) - private int nrOfFacts; - - @Override - protected void addResources() { - addClassPathResource("turtle/expert-basic-match-ratio-100.drl"); - } - - @Override - protected List generateFacts() { - List facts = new ArrayList(); - int loops = nrOfFacts / 2; - for (int i = 0; i < loops; i++) { - facts.add(new String("someString" + i)); - facts.add(new Integer(i)); - } - return facts; - } - - @Benchmark - public KieSession timeFactsInsertionAndRulesFiring() { - return insertFactsAndFireAllRules(); - } - -} diff --git a/drools-benchmarks-parent/drools-benchmarks/src/main/java/org/drools/benchmarks/turtle/runtime/TurtleFusionBenchmarkRunner.java b/drools-benchmarks-parent/drools-benchmarks/src/main/java/org/drools/benchmarks/turtle/runtime/TurtleFusionBenchmarkRunner.java index 9317af2e..48e72231 100644 --- a/drools-benchmarks-parent/drools-benchmarks/src/main/java/org/drools/benchmarks/turtle/runtime/TurtleFusionBenchmarkRunner.java +++ b/drools-benchmarks-parent/drools-benchmarks/src/main/java/org/drools/benchmarks/turtle/runtime/TurtleFusionBenchmarkRunner.java @@ -29,6 +29,7 @@ public static void main(String[] args) throws IOException { // Choose your benchmark here // Any benchmark that extends AbstractSimpleFusionRuntimeBenchmark can be put here final StartsStartedbyFusionBenchmark benchmark = new StartsStartedbyFusionBenchmark(); + benchmark.nrOfEvents = 200000; benchmark.createKBase(); benchmark.initFactsGenerators(); benchmark.initEventSenders();