流口水性能测试 [英] Drools Performance Tests

查看:105
本文介绍了流口水性能测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,我们正在寻求在系统中使用流口水来管理知识密集型流程。

Currently we are looking to use drools in a system for managing knowledge intensive processes.

据我所知,流口水的性能测试结果和结果稀缺且很难找到。

To the best of my knowledge information about and results of performance tests done for drools are scarce and hard to find.

虽然用例差异很大,但最好了解常见的瓶颈(例如,插入是一个)和可能的最佳实践,在某些情况下避开它们。另外,了解一般的性能可以帮助评估Drools是否是解决当前问题的可行解决方案。

While use cases differ widely, it would be good to know common bottlenecks (the inserts are one, for example) and possible best practices to get around them for certain scenarios. Also, knowing more about the performance in general could help evaluating if Drools is a viable solution to the problems at hand.

是否有关于性能指标和性能的任何信息

Is there any information about for example performance metrics and performance tests for drools made available?

推荐答案

我在使用Drools时发现的唯一陷阱是关于块创作。不要在when块中使用计算。
这也是流口水所说的 getters!

The only pitfall I found fundamental while working with drools is about when block authoring. Don't use computations in when blocks. This is what drools says even about getters!:

Person( age == 50 )

// this is the same as:
Person( getAge() == 50 )

注意

我们建议使用属性访问(age)而不是显式使用getter(getAge()),因为通过字段索引可以提高性能。 (来源

然后默认情况下,块 由同一(单个)线程执行。现在,这是您提高效率的专业精神。使用异步处理(Spring中的@Anync),线程池,java并行流等。

您可以使用jvisualvm来分析将规则列为有序Java方法调用的运行,并且可以使用任何其他工具来分析代码中的瓶颈,例如库,用于测试和实时环境。

Then block by default is executed by the same (single) thread. This is now your professionalism to make it efficient. Use asynchronous processing (@Anync in Spring), thread pool, java parallel streams etc.
You can use jvisualvm to profile the run where rules will be listed as ordinal java method calls and you can use any other tools to analyse bottlenecks in your code, like this library for tests and live environments.

这篇关于流口水性能测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆