Class Counter
A high-performance, thread-safe counter class used to measure throughput on user-defined metrics
Inheritance
System.Object
Counter
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NBench
Assembly: NBench.dll
Syntax
public sealed class Counter
Properties
Current
Current value of the counter
Declaration
public long Current { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Name
Declaration
public CounterMetricName Name { get; }
Property Value
Type | Description |
---|---|
CounterMetricName |
Methods
Decrement()
Decrement the value of the counter by 1
Declaration
public void Decrement()
Decrement(Int64)
Decrement the counter by a user-defined amount.
Declaration
public void Decrement(long v)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | v | The counter decrement value. |
Increment()
Increment the value of the counter by 1
Declaration
public void Increment()
Increment(Int64)
Increment the counter by a user-defined amount.
Declaration
public void Increment(long v)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | v | The counter increment value. |