Prerequisites: A valid RuleSession
Classes: FileSystemRuleApplicationReference, RuleSession, Entity, RuleException
See Also: Basic Example Of Calling Rules Engine, Retrieve the Performance Log
References: InRule.Runtime.dll, InRule.Common.dll
The following basic example demonstrates how to capture the Performance Statistics Report at run time.
// Turn on capturing of detailed statistics (if desired)
ruleSession.Settings.LogOptions = EngineLogOptions.DetailStatistics;
// Run rules
// Get the XML as a string for the Performance Statistics Report (includes log messages if log options configured to include them)
string reportXml = ruleSession.LastRuleExecutionLog.GetXml();
// Get the HTML as a string for the Performance Statistics Report
string reportHtml = ruleSession.LastRuleExecutionLog.GetHtml();
// write the report to the file system (could also view in a web browser control)
Please sign in to leave a comment.