SPMonitoredScope members

Monitors performance and resource use for a specified scoped block of code.

The SPMonitoredScope type exposes the following members.

Constructors

  Name Description
Public method SPMonitoredScope(String) Creates a new instance of a monitor and associates the monitor with a given scope.
Public method SPMonitoredScope(String, TraceSeverity, []) Creates a set of monitors and initializes them for use with a given scope using a specified friendly name and to monitor the provided scope for a given trace severity.
Public method SPMonitoredScope(String, UInt32, []) Creates a set of monitors and initializes them for use with a given scope using a specified friendly name and for a given duration of operation.

Top

Properties

  Name Description
Public property Children
Public propertyStatic member Current Gets the scoped segment of code that is currently being monitored.
Public property Id
Public property IsDeveloperDashboardEnabled Keep track of dev dashboard enabled information. This is useful when we are in a thread cannot get HttpContext
Public property Monitors Gets the monitors that are associated with a given scope.
Public property Name Gets or sets the friendly name for a given scoped block of code.
Public property Parent
Public property ParentScopeId The parent scope id for the current scope. If there is no parent, this will return -1
Public property ScopeId This is a unique id for a monitored scope inside a correlation id. Since one correlation id can have multiple requests. The scope can also have duplicated names and can be across several different machine. We need a unique id to identify the scope.

Top

Methods

  Name Description
Protected method AddMonitor<T> Adds a new monitor for this scope.
Public method Dispose() Stops all counters/timers for the current scope and any child scopes that have not been disposed yet.
Protected method Dispose(Boolean)
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetMonitor<T> Retrieves the monitor of the specified type from the current scope.
Public method GetMonitorRecursive<T> Gets the monitor from this scope of the specified type.
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Protected method OnDisposing Releases all monitors and then calls methods to log monitoring statistics and to set the previous scope to the current scope.
Public method ToString (Inherited from Object.)

Top

See also

Reference

SPMonitoredScope class

Microsoft.SharePoint.Utilities namespace