BackgroundQBO 3's HttpHandler and AbstractObject classes have performance logging built into them. By default, performance logging is turned off in standard website setups, and should remain off unless you are actively engaged in troubleshooting performance issues. Quick StartTo turn performance logging on, you need to modify the web.config file as follows: Create a listener to send performance information to, and add the listener to the Performance category source. <loggingConfiguration name="" tracingEnabled="true" defaultCategory="General"> <listeners> ... <add name="PerformanceLog" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=null" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=null" fileName="performance.log" formatter="Text Formatter" rollInterval="Day" /> ... <listeners> ... <categorySource> <add switchValue="All" name="Performance"> ... <listeners> <add name="PerformanceLog"/> </listeners> </add> </categorySources> </loggingConfiguration> Don't copy and paste this entire block as-is into your web.config file. The ellipsis (...) in the code sample above are placeholders for configuration that already exists in most web.config files. In short, you need to insert or replace the PerformanceLog listener, and add it to the listeners for the Performance category. DetailsQBO 3 leverages the Microsoft Enterprise Template Library (ETL)'s Logging patterns. This does several things, including:
For performance logging of a call to Valuation.ashx/Summary?ID=X, this is what happens:
This creates entries in the performance log akin to: Message: Start Trace: Activity
'28ffd1c2-f95e-4dfe-ad6e-6e47f0f86a2b' in method 'qbo.Application.HttpHandler.ProcessQuery' at 681496160415 ticks Message: qbo.Mortgage.ValuationObject/ObjectTree took 9 ms to execute Message: qbo.Mortgage.ValuationObject/ObjectData took 2 ms to execute Message: qbo.Mortgage.ValuationObject/Navigation took 2 ms to execute Message: Xslt Templates/Mortgage//Valuation.Summary.xslt load time took 206 ms to execute Message: End Trace: Activity '28ffd1c2-f95e-4dfe-ad6e-6e47f0f86a2b' in method 'qbo.Application.HttpHandler.ProcessQuery' at 681632296083 ticks (elapsed time: 0.01 Navigating to Valuation.ashx/Summary?ID=X again will produce similar results, minus the loading of Valuation.Summary.xslt (assuming that Xslt caching is turned on). Logging Performance to Amazon Simple DBLogging performance is nice, but text files are not particularly useful when it comes to digesting the performance information. The qbo.Logging.Amazon class provides a logging sink that logs to Amazon's Simple DB, which can be queried to find interesting trends. Below is a screen shot of a Visual Studio view of an Amazon Simple DB query of performance data. Note that the columns are an exact map of the ETL LogEntry structure; all logging has the same basic columns. However, there is a hook for extending these columns via LogEntry.ExtendedProperties. Interesting columns include:
To configure performance logging to Amazon Simple DB, do the following:
<listeners> ... <add name=" AmazonPerformanceLog " type="qbo.Logging.Amazon.SimpleDbTraceListener, qbo.Logging.Amazon" listenerDataType="qbo.Logging.Amazon.SimpleDbTraceListenerData, qbo.Logging.Amazon" domain="qbo-performance-log" accessKey="AKIAJ62PDOUPV33GTSHQ" secretKey="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" formatter="Text Formatter" /> </listeners> ... <categorySources> ... <add switchValue="All" name="Performance"> <listeners> <add name=" AmazonPerformanceLog " /> </listeners> </add> ... </categorySources>
To view performance logging results, you can use the AWSSDK Toolkit for Visual Studio. Once installed, Visual Studio offers an 'AWS Explorer' pane, which you can expand to view Amazon SimpleDB domains, and open a query window for a domain. FilteringLogging all performance data is will generate a lot of data. Often, we're interested only in slow-running operations. The qbo.Logging.PerformanceFilter class can be used to limit logging to only those operations that take more than a given amount of time to execute. If used, the default minimum execution time to log is 2500 ms, but this is adjustable in web.config. <add enabled="true" type="qbo.Logging.PerformanceFilter, qbo.Logging" name="Performance Filter" MinDuration="100"/> Next StepsThe next step is to build web-based dashboards on top of this data, so administrators can:
|
Quandis Business Objects 3 > QBO 3 Blog >