Skip to main content
LinkedIn
Copied!

Table of Contents

Rule usage snapshots

Version:

Only available versions of this content are shown in the dropdown

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.

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.

Property Description More
pyLabel Identifies the type of snapshot. The value "shutdown" is reserved.
pxClassName Full 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
pxLastUse Date and time that the rule was last executed.
pxNumPeeks Number of times the class loader checked to see whether this entry was loaded.
pxNumInvalidate Number of times the cache content was invalidated (unloaded), such that the next request forces rules assembly. rules assembly
pxNumLoads Number of times this class was loaded.
pxNumReload Number of times this class was reloaded without forcing a rules assembly.
pxRuleCount Number of dependences that this rule has.
pxCreateDateTime First date and time this rule was captured by this snapshot.
pxUpdateDateTIme Most recent date and time this rule was captured by this snapshot.
pxSize Size of the Java CLASS file in bytes.
pxSystemNode Node ID (hash) on which this snapshot was captured. Node ID
pxUseCount Number 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.

Did you find this content helpful?

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

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

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us