Export (0) Print
Expand All

CounterSample Structure

Defines a structure that holds the raw data for a performance counter.

Namespace:  System.Diagnostics
Assembly:  System (in System.dll)

[<Sealed>]
type CounterSample =  struct end

The CounterSample type exposes the following members.

  NameDescription
Public methodCounterSample(Int64, Int64, Int64, Int64, Int64, Int64, PerformanceCounterType)Initializes a new instance of the CounterSample structure and sets the CounterTimeStamp property to 0 (zero).
Public methodCounterSample(Int64, Int64, Int64, Int64, Int64, Int64, PerformanceCounterType, Int64)Initializes a new instance of the CounterSample structure and sets the CounterTimeStamp property to the value that is passed in.
Top

  NameDescription
Public propertyBaseValueGets an optional, base raw value for the counter.
Public propertyCounterFrequencyGets the raw counter frequency.
Public propertyCounterTimeStampGets the counter's time stamp.
Public propertyCounterTypeGets the performance counter type.
Public propertyRawValueGets the raw value of the counter.
Public propertySystemFrequencyGets the raw system frequency.
Public propertyTimeStampGets the raw time stamp.
Public propertyTimeStamp100nSecGets the raw, high-fidelity time stamp.
Top

  NameDescription
Public methodStatic memberCalculate(CounterSample)Calculates the performance data of the counter, using a single sample point. This method is generally used for uncalculated performance counter types.
Public methodStatic memberCalculate(CounterSample, CounterSample)Calculates the performance data of the counter, using two sample points. This method is generally used for calculated performance counter types, such as averages.
Public methodEquals(CounterSample)Indicates whether the specified CounterSample structure is equal to the current CounterSample structure.
Public methodEquals(Object)Indicates whether the specified structure is a CounterSample structure and is identical to the current CounterSample structure. (Overrides ValueType.Equals(Object).)
Public methodGetHashCodeGets a hash code for the current counter sample. (Overrides ValueType.GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringReturns the fully qualified type name of this instance. (Inherited from ValueType.)
Top

  NameDescription
Public operatorStatic memberEqualityReturns a value that indicates whether two CounterSample structures are equal.
Public operatorStatic memberInequalityReturns a value that indicates whether two CounterSample structures are not equal.
Top

  NameDescription
Public fieldStatic memberEmptyDefines an empty, uninitialized performance counter sample of type NumberOfItems32.
Top

The following example demonstrates the use of the CounterSample class to display data for a performance counter.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft