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#780] DMN - Benchmarking InfixOpNode and InfixOperators #281

Merged
merged 8 commits into from
Dec 20, 2023

Conversation

gitgabrio
Copy link
Contributor

Add InfixOpNode and InfixOpOperators specific benchmarks
Fixes apache/incubator-kie-issues#780

Continuation of #279 (closed due to branch renaming)

Copy link
Contributor

@mariofusco mariofusco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion using a Map as I did here, makes sense only as a context when evaluating an expression in integration, but not when benchmarking the Executors in isolation as you're doing. Also accessing the map in the benchmarking method has a cost that you may want to avoid, because it is just noise and not the thing that you want to measure. You could obtain the same result using an Object[] instead of a Map so that in the benchmarking method instead of having

    @Benchmark
    public Object evaluate() {
        return executor.evaluate(map.get("a"), map.get("b"), ctx);
    }

you could just do

    @Benchmark
    public Object evaluate() {
        return executor.evaluate(array[0], array[1], ctx);
    }

Also I suggest to add more benchmarks parsing and evaluating complete expression in the same style of the one in my comment that I linked above (but this could be eventually done with another PR as well).

@gitgabrio gitgabrio marked this pull request as ready for review December 20, 2023 09:51
@gitgabrio gitgabrio merged commit acaae15 into apache:main Dec 20, 2023
0 of 2 checks passed
@gitgabrio gitgabrio deleted the incubator-kie-issues#780 branch December 20, 2023 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DMN - Benchmarking InfixOpNode and InfixOperators
2 participants