Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Rule usage snapshots

Updated on May 11, 2022

Pega Platform maintains statistics about the number of rule executions since startup. During system shutdown, the system saves these statistics to the Pega Platform database for later review and analysis.

The system holds these statistics as property values in the Log-RuleUsage class, with additional detail in the Log-RuleUsage-Details class.

Note: Log-RuleUsage data, which covers only rule types that are converted to Java code by rules assembly, is different from Log-Usage data, which covers system and requestor performance.

How it works

Pega Platform maintains statistics during operation which are written to the Pega Platform database for later review and analysis during application server shutdown.

These statistics cover all requestors of every type, with cumulative statistics since startup. This can be helpful in identifying the most frequently and least frequently executed rules (for those rule types that are assembled using rules assembly).

By "rule," this topic means "a Java class created by rules assembly." One Pega Platform activity named Alpha-Mort-.Recalculate might produce multiple rules, one for each variation in:

  • Primary page class at the time of assembly (for subclasses of Alpha-Mort-.)
  • Ruleset and version
  • Node
  • Ruleset list of the requestor

Key

The value of the pzInsKey key property of a Log-RuleUsage is concatenated from these other property values:

  • pxClassName – Always Log-RuleUsage
  • pxSystemNode – Node ID of the node from which the snapshot was captured
  • The full Java class name of the assembled rule, starting with a type.
  • pyLabel – The snapshot name, such as "shutdown"

The Java class name identifies the rule type. Three examples are:

      DECISIONTREE.RA_DECLARE_DECISIONTREE_RULE_PARSE_DELIMITED_GETPROMPTKEY_362AD3D39240B644A4CFBE58EA5DA52E
      RA_ACTIVITY_DATA_ADMIN_OPERATOR_ID_SAVEDEVELOPERPREFERENCESXML_0C4D9291362765E0470388C76C1FD527
      RA_HTML_FRAGMENT_SMARTPROMPT_NOINPUT_1EF7F65A6B1B426D7A6E5A270B8DF4DD!

Unlike most other concrete classes derived from the Log- base class, the pxCreateDateTime property is not part of the key of the Log-RuleUsage class.

Statistics in Log-RuleUsage

The following properties are of primary interest in each snapshot row. All statistics are since startup of a node or since installation, covering all requestors of all types.

PropertyDescriptionMore
pyLabelIdentifies the type of snapshot. The value "shutdown" is reserved.
pxClassNameFull Java class name for the rule-assembled rule.rules assembly
pxFamilyName Rule type concatenated with visible key, converted to lowercase characters and converting special characters to underscore characters. For example:
activity_code_pega_list_inuserdesktop
pxLastUseDate and time that the rule was last executed.
pxNumPeeksNumber of times the class loader checked to see whether this entry was loaded.
pxNumInvalidateNumber of times the cache content was invalidated (unloaded), such that the next request forces rules assembly.rules assembly
pxNumLoadsNumber of times this class was loaded.
pxNumReloadNumber of times this class was reloaded without forcing a rules assembly.
pxRuleCountNumber of dependences that this rule has.
pxCreateDateTimeFirst date and time this rule was captured by this snapshot.
pxUpdateDateTImeMost recent date and time this rule was captured by this snapshot.
pxSizeSize of the Java CLASS file in bytes.
pxSystemNodeNode ID (hash) on which this snapshot was captured.Node ID
pxUseCountNumber of times this rule was requested from the cache.

Cumulative statistics

No automatic processing purges rows of the pr4_log_usage table. If your system has been shut down more than once, statistics for pxNumInvalidate, pxRuleCount, pxUseCount, pxNumReload, pxNumPeeks, pxNumLoads are cumulative since installation. Statistics for pxUpdateDateTime, pxLastUse are from the most recent shutdown.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us