mscorlib(4.0.0.0) API with additions
|
Defines a structure that holds the raw data for a performance counter. More...
Public Member Functions | |
CounterSample (long rawValue, long baseValue, long counterFrequency, long systemFrequency, long timeStamp, long timeStamp100nSec, PerformanceCounterType counterType) | |
Initializes a new instance of the T:System.Diagnostics.CounterSample structure and sets the P:System.Diagnostics.CounterSample.CounterTimeStamp property to 0 (zero). More... | |
CounterSample (long rawValue, long baseValue, long counterFrequency, long systemFrequency, long timeStamp, long timeStamp100nSec, PerformanceCounterType counterType, long counterTimeStamp) | |
Initializes a new instance of the T:System.Diagnostics.CounterSample structure and sets the P:System.Diagnostics.CounterSample.CounterTimeStamp property to the value that is passed in. More... | |
override bool | Equals (object o) |
Indicates whether the specified structure is a T:System.Diagnostics.CounterSample structure and is identical to the current T:System.Diagnostics.CounterSample structure. More... | |
bool | Equals (CounterSample sample) |
Indicates whether the specified T:System.Diagnostics.CounterSample structure is equal to the current T:System.Diagnostics.CounterSample structure. More... | |
override int | GetHashCode () |
Gets a hash code for the current counter sample. More... | |
Static Public Member Functions | |
static float | Calculate (CounterSample counterSample) |
Calculates the performance data of the counter, using a single sample point. This method is generally used for uncalculated performance counter types. More... | |
static float | Calculate (CounterSample counterSample, CounterSample nextCounterSample) |
Calculates the performance data of the counter, using two sample points. This method is generally used for calculated performance counter types, such as averages. More... | |
static bool | operator== (CounterSample a, CounterSample b) |
Returns a value that indicates whether two T:System.Diagnostics.CounterSample structures are equal. More... | |
static bool | operator != (CounterSample a, CounterSample b) |
Returns a value that indicates whether two T:System.Diagnostics.CounterSample structures are not equal. More... | |
Public Attributes | |
long | RawValue => rawValue |
Gets the raw value of the counter. More... | |
internal ulong | UnsignedRawValue => (ulong)rawValue |
long | BaseValue => baseValue |
Gets an optional, base raw value for the counter. More... | |
long | SystemFrequency => systemFrequency |
Gets the raw system frequency. More... | |
long | CounterFrequency => counterFrequency |
Gets the raw counter frequency. More... | |
long | CounterTimeStamp => counterTimeStamp |
Gets the counter's time stamp. More... | |
long | TimeStamp => timeStamp |
Gets the raw time stamp. More... | |
long | TimeStamp100nSec => timeStamp100nSec |
Gets the raw, high-fidelity time stamp. More... | |
PerformanceCounterType | CounterType => counterType |
Gets the performance counter type. More... | |
Static Public Attributes | |
static CounterSample | Empty = new CounterSample(0L, 0L, 0L, 0L, 0L, 0L, PerformanceCounterType.NumberOfItems32) |
Defines an empty, uninitialized performance counter sample of type NumberOfItems32 . More... | |
Defines a structure that holds the raw data for a performance counter.
Definition at line 4 of file CounterSample.cs.
System.Diagnostics.CounterSample.CounterSample | ( | long | rawValue, |
long | baseValue, | ||
long | counterFrequency, | ||
long | systemFrequency, | ||
long | timeStamp, | ||
long | timeStamp100nSec, | ||
PerformanceCounterType | counterType | ||
) |
Initializes a new instance of the T:System.Diagnostics.CounterSample structure and sets the P:System.Diagnostics.CounterSample.CounterTimeStamp property to 0 (zero).
rawValue | The numeric value associated with the performance counter sample. |
baseValue | An optional, base raw value for the counter, to use only if the sample is based on multiple counters. |
counterFrequency | The frequency with which the counter is read. |
systemFrequency | The frequency with which the system reads from the counter. |
timeStamp | The raw time stamp. |
timeStamp100nSec | The raw, high-fidelity time stamp. |
counterType | A T:System.Diagnostics.PerformanceCounterType object that indicates the type of the counter for which this sample is a snapshot. |
Definition at line 67 of file CounterSample.cs.
System.Diagnostics.CounterSample.CounterSample | ( | long | rawValue, |
long | baseValue, | ||
long | counterFrequency, | ||
long | systemFrequency, | ||
long | timeStamp, | ||
long | timeStamp100nSec, | ||
PerformanceCounterType | counterType, | ||
long | counterTimeStamp | ||
) |
Initializes a new instance of the T:System.Diagnostics.CounterSample structure and sets the P:System.Diagnostics.CounterSample.CounterTimeStamp property to the value that is passed in.
rawValue | The numeric value associated with the performance counter sample. |
baseValue | An optional, base raw value for the counter, to use only if the sample is based on multiple counters. |
counterFrequency | The frequency with which the counter is read. |
systemFrequency | The frequency with which the system reads from the counter. |
timeStamp | The raw time stamp. |
timeStamp100nSec | The raw, high-fidelity time stamp. |
counterType | A T:System.Diagnostics.PerformanceCounterType object that indicates the type of the counter for which this sample is a snapshot. |
counterTimeStamp | The time at which the sample was taken. |
Definition at line 88 of file CounterSample.cs.
|
static |
Calculates the performance data of the counter, using a single sample point. This method is generally used for uncalculated performance counter types.
counterSample | The T:System.Diagnostics.CounterSample structure to use as a base point for calculating performance data. |
Definition at line 103 of file CounterSample.cs.
|
static |
Calculates the performance data of the counter, using two sample points. This method is generally used for calculated performance counter types, such as averages.
counterSample | The T:System.Diagnostics.CounterSample structure to use as a base point for calculating performance data. |
nextCounterSample | The T:System.Diagnostics.CounterSample structure to use as an ending point for calculating performance data. |
Definition at line 112 of file CounterSample.cs.
override bool System.Diagnostics.CounterSample.Equals | ( | object | o | ) |
Indicates whether the specified structure is a T:System.Diagnostics.CounterSample structure and is identical to the current T:System.Diagnostics.CounterSample structure.
o | The T:System.Diagnostics.CounterSample structure to be compared with the current structure. |
true
if o is a T:System.Diagnostics.CounterSample structure and is identical to the current instance; otherwise, false
. Definition at line 121 of file CounterSample.cs.
bool System.Diagnostics.CounterSample.Equals | ( | CounterSample | sample | ) |
Indicates whether the specified T:System.Diagnostics.CounterSample structure is equal to the current T:System.Diagnostics.CounterSample structure.
sample | The T:System.Diagnostics.CounterSample structure to be compared with this instance. |
true
if sample is equal to the current instance; otherwise, false
. Definition at line 134 of file CounterSample.cs.
override int System.Diagnostics.CounterSample.GetHashCode | ( | ) |
Gets a hash code for the current counter sample.
Definition at line 145 of file CounterSample.cs.
|
static |
Returns a value that indicates whether two T:System.Diagnostics.CounterSample structures are not equal.
a | A T:System.Diagnostics.CounterSample structure. |
b | Another T:System.Diagnostics.CounterSample structure to be compared to the structure specified by the a parameter. |
true
if a and b are not equal; otherwise, false
Definition at line 165 of file CounterSample.cs.
|
static |
Returns a value that indicates whether two T:System.Diagnostics.CounterSample structures are equal.
a | A T:System.Diagnostics.CounterSample structure. |
b | Another T:System.Diagnostics.CounterSample structure to be compared to the structure specified by the a parameter. |
true
if a and b are equal; otherwise, false
.Definition at line 155 of file CounterSample.cs.
long System.Diagnostics.CounterSample.BaseValue => baseValue |
Gets an optional, base raw value for the counter.
Definition at line 33 of file CounterSample.cs.
long System.Diagnostics.CounterSample.CounterFrequency => counterFrequency |
Gets the raw counter frequency.
Definition at line 41 of file CounterSample.cs.
long System.Diagnostics.CounterSample.CounterTimeStamp => counterTimeStamp |
Gets the counter's time stamp.
Definition at line 45 of file CounterSample.cs.
PerformanceCounterType System.Diagnostics.CounterSample.CounterType => counterType |
Gets the performance counter type.
Definition at line 57 of file CounterSample.cs.
|
static |
Defines an empty, uninitialized performance counter sample of type NumberOfItems32
.
Definition at line 23 of file CounterSample.cs.
long System.Diagnostics.CounterSample.RawValue => rawValue |
Gets the raw value of the counter.
Definition at line 27 of file CounterSample.cs.
long System.Diagnostics.CounterSample.SystemFrequency => systemFrequency |
Gets the raw system frequency.
Definition at line 37 of file CounterSample.cs.
long System.Diagnostics.CounterSample.TimeStamp => timeStamp |
Gets the raw time stamp.
Definition at line 49 of file CounterSample.cs.
long System.Diagnostics.CounterSample.TimeStamp100nSec => timeStamp100nSec |
Gets the raw, high-fidelity time stamp.
Definition at line 53 of file CounterSample.cs.