All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.drools.benchmark.benchmarks.AgendaInsertRetractBenchmark Maven / Gradle / Ivy

There is a newer version: 7.36.1.Final
Show newest version
package org.drools.benchmark.benchmarks;

import org.kie.api.runtime.rule.FactHandle;

public class AgendaInsertRetractBenchmark extends AgendaBenchmark {

    public AgendaInsertRetractBenchmark(int rulesNr) {
        super(rulesNr);
    }

    public void execute(int repNr) {
        for (int i = 0; i < rulesNr; i++) {
            facts[i] = ksession.insert(new Integer(i));
        }
        for (FactHandle fact : facts) {
            ksession.retract(fact);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy