concept scope performance monitor in category sharePoint

appears as: scoped performce monitors
SharePoint 2010 Web Parts in Action

This is an excerpt from Manning's book SharePoint 2010 Web Parts in Action.

8.3.4. Logging using scoped performance monitors

Logging can be improved using custom scoped performance monitors. A custom monitor is a class deriving from the ISPScopedPerformanceMonitor interface. Monitors can be used to monitor and log actions in your custom code. For instance, you could use a monitor to log the number of calls made to a specific web service or a specific code that uses other expensive resources in the trace log. Each monitor can also have a threshold that’s monitored by SharePoint. Classes implemented from this interface can be passed as arguments to a monitored scope.