Git Product home page Git Product logo

rules-execution-analysis's Introduction

rules-execution-analysis

tool to compare two JBoss BRMS/Drools rules executions with different two versions of rules with same data.

Why

With JBoss BRMS/Drools, After start modification of existing rules or tuning rules,
you would have questions such as ...

  • How much different the execution speed ?
  • Are there differences of the result facts ?
  • Are there differences of the execution count of each rules ?
  • Are there differences of the execution sequence of rules ?
  • Are there differences of the activations count created/canceled/executed in the rule engine ?

This is a tool to answer above questions.
The tool executes the two versions of the rules with the same data then generates a HTML report.
The report can be integrated into the Testing or Simulation Pipleline with the HTML report plugin of Jenkins.

An example report

After warm up and execution of two version of rules, you will get a HTML report like below.

An example report

This is the part of the Activation differences. By some tuning of rules, most of the useless activations were removed. In the Activation part, you can see ...

  • How many activations created of each rules.
  • Which rule were executed prior such activation creation.
  • How many such activation executed/canceled.
  • Which rule were executed prior such activation execution/cancellation.

How to use

    DefaultRuleSimulator ruleSimulator = new DefaultRuleSimulator();
    ruleSimulator.setBaseRules(kieContainer.getKieBase("rules"));
    ruleSimulator.setWorkingRules(kieContainer.getKieBase("workingRules"));
    ruleSimulator.setWarmupSeconds(30);
    ruleSimulator.setReportDir(reportBaseDir);
    ruleSimulator.executeAllStats(commandsFactory);

After warm up and execution of two verson of rules, report.html will be generated in the reportBaseDir path.

How to pass the test data

Check the CommandsFactory interface and its test sample code in the RuleSimulatorTest.

License

Apache License Version 2.0

Author

okuniyas

rules-execution-analysis's People

Contributors

okuniyas avatar dependabot[bot] avatar

Stargazers

Karsten Gresch avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.