Monitoring rules statistics
You can monitor rules statistics that provide insight as to how frequently individual statements within a rule execute and how long it takes to run a rule statement.
About this task
Statistics about rule execution are stored in the }StatsByRule control cube.
Each time a rule is changed or compiled, the data for that rule is cleared and updated in the }StatsByRule control cube. This helps you to immediately see the impact of a rule change. The data in the }StatsByRule control cube does not persist between server sessions; it is cleared every time that you restart your TM1 server.
The }StatsByRule cube contains three dimension:
- }Cubes - Contains elements corresponding to each cube on your TM1 server.
- }LineNumber - Contains elements 1 through 10,000, corresponding to line numbers in a TM1 rules
.rux file. Tip: The TM1 Rules Editor does not display line numbers. Open the .rux file in a text editor that supports line numbers to view the line numbers for a rule.
- }Rules Stats - Contains elements corresponding to the information and statistics that are
collected for rules, including:
- Rule Text - The first portion of a rule statement, provided to help you identify the statement.
- Total Run Count - The total number of times the rule statement has run.
- Min Time - The minimum amount of time taken for the rule statement to run, in milliseconds.
- Max Time - The maximum amount of time taken for the rule statement to run, in milliseconds.
- Total Time - The total amount of time taken for the rule statement to run, in milliseconds.
- Last Run Time - The amount of time, in milliseconds, it took for the most recent execution of the rule statement.
Rule statistics collection is enabled on a per-cube basis by setting the RULE_STATS property to YES in the }CubeProperties control cube.
Note: The collection of rule statistics does incur a slight performance cost that increases with the
frequency of rule execution. You should enable statistic collection only while debugging or tuning
your rules. During normal operation you should disable statistic collection.