业务规则引擎预期性能
如何评估规则引擎?您测试什么来查看其性能是否正常?每个规则执行的毫秒数?规则的复杂性?如果是“每条规则的时间”,那么什么时间被认为是好/坏?谢谢!
How rule engines are evaluated? What do you test to see if it performs OK or not? Milliseconds per single rule execution? Complexity of a rule? If it's "time per rule", what time is considered to be great/bad? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
规则引擎的一个主要卖点是速度。通常会编译您的规则,而不是解释它们,否则用简单的脚本语言编写规则不是更容易吗?规则不应花费超过几毫秒的时间。
A major selling point of rules engines are speed. The usually compile your rules, rather than interpreting them, otherwise wouldn't it be easier to just write the rules in a simple scripting language? Rules should not take more that a couple ms.
这完全取决于您想要评估的内容以及对您来说最重要的内容。
如果对规则引擎的调用的纯粹执行时间最重要,那么您应该使用以与您期望的方式类似的方式设计的规则集运行测试。业务规则项目的结构、一致性和复杂性可能因项目而异。因此,不可能对执行时间做出一般性的陈述。考虑一个具有 5000 条非常统一的规则的项目,而不是一个具有 100 条复杂且相互依赖的规则的项目。不同的引擎将以不同的速度处理这些场景。规则引擎处理选择合格执行规则的方式是决定性能的另一个因素。
业务规则管理系统 (BRMS) 的另一个重要部分是易于开发、更改和维护规则。是否有用于规则治理、规则生命周期管理、自动化测试和管理的系统?模拟或业务用户的简化前端。
It all depends on what you want to evaluate and what's most important to you.
If the pure execution time of a call to the rule engine is most important, you should run tests with rulesets that are designed in a similar way than you expect them to be. The structure, uniformity and complexity of business rule projects can vary widely from project to project. Because of that, it's impossible to make general statements about execution times. Consider a project with 5000 very uniform rules as opposed to a project with 100 complex and interdependent rules. Different engines will handle these scenarios with varying speed. The way a rule engine handles the selection of eligible rules for execution is another factor that determines the performance.
Another important part of a Business Rule Management System (BRMS) is the ease of development, change and maintenance of the rules. Whether or not there are systems in place for rule governance, management of the rule lifecycle, automated testing & simulation or a simplified frontend for business-user.