ICounterProvider.GetCounterValue Method

Gets the current value of a performance counter.

Namespace:  Microsoft.VisualStudio.TestTools.LoadTesting
Assembly:  Microsoft.VisualStudio.QualityTools.LoadTestFramework (in Microsoft.VisualStudio.QualityTools.LoadTestFramework.dll)

Syntax

'Declaration
Function GetCounterValue ( _
    machineName As String, _
    categoryName As String, _
    counterName As String, _
    instanceName As String _
) As PerformanceCounterValue
'Usage
Dim instance As ICounterProvider 
Dim machineName As String 
Dim categoryName As String 
Dim counterName As String 
Dim instanceName As String 
Dim returnValue As PerformanceCounterValue 

returnValue = instance.GetCounterValue(machineName, _
    categoryName, counterName, instanceName)
PerformanceCounterValue GetCounterValue(
    string machineName,
    string categoryName,
    string counterName,
    string instanceName
)
PerformanceCounterValue^ GetCounterValue(
    String^ machineName, 
    String^ categoryName, 
    String^ counterName, 
    String^ instanceName
)
function GetCounterValue(
    machineName : String, 
    categoryName : String, 
    counterName : String, 
    instanceName : String
) : PerformanceCounterValue

Parameters

  • machineName
    Type: System.String

    The name of the computer from which the performance counter value is collected.

  • categoryName
    Type: System.String

    The category name of the performance counter.

  • counterName
    Type: System.String

    The name of the performance counter.

  • instanceName
    Type: System.String

    The name of the instance of the performance counter.

Return Value

Type: Microsoft.VisualStudio.TestTools.LoadTesting.PerformanceCounterValue
A PerformanceCounterValue object.

.NET Framework Security

See Also

Reference

ICounterProvider Interface

ICounterProvider Members

Microsoft.VisualStudio.TestTools.LoadTesting Namespace