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.StringThe name of the computer from which the performance counter value is collected.
categoryName
Type: System.StringThe category name of the performance counter.
counterName
Type: System.StringThe name of the performance counter.
instanceName
Type: System.StringThe name of the instance of the performance counter.
Return Value
Type: Microsoft.VisualStudio.TestTools.LoadTesting.PerformanceCounterValue
A PerformanceCounterValue object.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.