Record and report rules usage statistics #47
Labels
enhancement
New feature or request
help wanted
Extra attention is needed
low priority
Low priority issue
Purpose
Record usage of each rule and generate statistics, to help users assess the impact of specific rules on their usage scenarios.
Main functionalities
Assume default time bucket for counters as 1 hour - but make it configurable. Make sure each time bucket records its' start date and time.
Proposal
Assume the record of evaluation and match counters to be created/updated on each evaluation done to
RulesEngine
. A internal Rules.Framework component for acting as listener should be designed and implemented to achieve this - design open for suggestions, leaving this without proposal for now.Create a new method on
RulesEngine
to generate statistics in a tabular-like format -Statistics GenerateRulesUsageStatistics(GenerateRulesUsageStatisticsArgs generateStatisticsArgs)
:GenerateRulesUsageStatisticsArgs
:DateBegin
andDateEnd
ContentType
RuleNames
- an array of stringsScope
- an enum parameter:Statistics
:StatisticsBucket
:StatisticsBucket
includes:Name
to describe, in this case, which rule name the bucket refers toTimestamp
to describe in time to when the bucket is reportingValue
to refer the bucket value - in this case it will be an integer, but it would be appropriate to use a decimal or a floating point type for future usage on other statistics use cases.StatisticsBucket
per name or per timestamp?DateBegin
andDateEnd
NOTE: proposal is open to debate and actual implementation plan is to be added later here.
The text was updated successfully, but these errors were encountered: