Share via


SPDiagnosticsPerformanceCounterProvider.AddCounter method (String, String, Boolean)

Add performance counter to the category

Namespace:  Microsoft.SharePoint.Diagnostics
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Overridable Sub AddCounter ( _
    category As String, _
    counter As String, _
    addAllInstances As Boolean _
)
'Usage
Dim instance As SPDiagnosticsPerformanceCounterProvider
Dim category As String
Dim counter As String
Dim addAllInstances As Boolean

instance.AddCounter(category, counter, _
    addAllInstances)
public virtual void AddCounter(
    string category,
    string counter,
    bool addAllInstances
)

Parameters

  • addAllInstances
    Type: System.Boolean

    A Boolean value indicating whether adding all instances or not.

Remarks

This should be called when adding a single instance counter or adding all instances.

See also

Reference

SPDiagnosticsPerformanceCounterProvider class

SPDiagnosticsPerformanceCounterProvider members

AddCounter overload

Microsoft.SharePoint.Diagnostics namespace