Configure performance measurement
You can configure performance measurement to measure and log the performance of functions on an appliance.
Complete the following high-level steps.
- View the performance information shown on the dashboard and decide what kind of information you want to record in a log file.
For example, you might want to record the average time consumed for looking up host names on a DNS server. This information is shown by the DNS Lookup feature of the dashboard. - Use the properties that are available for logging performance information in existing logging rules or new logging rules that you create.
For example, insert the Timer.ResolveHostNameviaDNS property into the event that creates a log line in the Write access.log rule of the default Access Log rule set. - Measure the time consumed for processing particular rule sets.
- Insert a rule with an event that starts the internal stopwatch at the beginning of a rule set.
- To stop the watch and measure the time consumed:
- Insert a rule with an event that performs these activities at the end of the rule set.
- Insert an event that performs these activities into each of the existing rules that is capable of stopping the rule set before all its rules are processed.
For example, to measure the processing time consumed by a URL filtering rule set:- insert a rule with the Stopwatch.Start (URL Filtering) event at the beginning of the rule set.
- Insert a rule with the Stopwatch.Stop (URL Filtering) event at the end.
- Insert the Stopwatch.Stop (URL Filtering) event into each of the whitelisting and blocking rules of the rule set because they all can stop the processing of further rules.
- Use the properties that are available for logging the measured processing time in existing logging rules or new logging rules that you create.
For example, insert the Stopwatch.GetMilliSeconds (URL Filtering) property into the event that creates a log line in the Write access.log rule of the default Access Log rule set.