C# 클래스 HdrHistogram.IntConcurrentHistogram

An integer values High Dynamic Range (HDR) Histogram that supports safe concurrent recording operations.
A IntConcurrentHistogram guarantees lossless recording of values into the histogram even when the histogram is updated by multiple threads.

It is important to note that concurrent recording is the only thread-safe behavior provided by IntConcurrentHistogram. It provides no implicit synchronization that would prevent the contents of the histogram from changing during other operations. These non-synchronised operations include queries, iterations, copies, or addition operations on the histogram. Concurrent updates that would safely work in the presence of queries, copies, or additions of histogram objects should use the Recorder which is intended for this purpose.

상속: HistogramBase
파일 보기 프로젝트 열기: HdrHistogram/HdrHistogram.NET 1 사용 예제들

공개 메소드들

메소드 설명
Copy ( ) : HistogramBase

Copies the data from this instance to a new instance.

IntConcurrentHistogram ( long lowestTrackableValue, long highestTrackableValue, int numberOfSignificantValueDigits ) : System

Construct a IntConcurrentHistogram given the lowest and highest values to be tracked and a number of significant decimal digits. Providing a lowestTrackableValue is useful is situations where the units used for the histogram's values are much smaller that the minimal accuracy required. For example when tracking time values stated in nanoseconds, where the minimal accuracy required is a microsecond, the proper value for lowestTrackableValue would be 1000.

IntConcurrentHistogram ( long instanceId, long lowestTrackableValue, long highestTrackableValue, int numberOfSignificantValueDigits ) : System

Construct a IntConcurrentHistogram given the lowest and highest values to be tracked and a number of significant decimal digits.

Providing a lowestTrackableValue is useful in situations where the units used for the histogram's values are much smaller that the minimal accuracy required. For example when tracking time values stated in ticks (100 nanoseconds), where the minimal accuracy required is a microsecond, the proper value for lowestTrackableValue would be 10.

보호된 메소드들

메소드 설명
AddToCountAtIndex ( int index, long addend ) : void

Adds the specified amount to the count of the provided index. Also increments the HistogramBase.TotalCount by the same amount.

ClearCounts ( ) : void

Clears the counts of this implementation.

CopyCountsInto ( long target ) : void

Copies the internal counts array into the supplied array.

GetCountAtIndex ( int index ) : long

Gets the number of recorded values at a given index.

IncrementCountAtIndex ( int index ) : void

Increments the count at the given index. Will also increment the HistogramBase.TotalCount.

SetCountAtIndex ( int index, long value ) : void

Sets the count at the given index.

메소드 상세

AddToCountAtIndex() 보호된 메소드

Adds the specified amount to the count of the provided index. Also increments the HistogramBase.TotalCount by the same amount.
protected AddToCountAtIndex ( int index, long addend ) : void
index int The index to increment.
addend long The amount to increment by.
리턴 void

ClearCounts() 보호된 메소드

Clears the counts of this implementation.
protected ClearCounts ( ) : void
리턴 void

Copy() 공개 메소드

Copies the data from this instance to a new instance.
public Copy ( ) : HistogramBase
리턴 HistogramBase

CopyCountsInto() 보호된 메소드

Copies the internal counts array into the supplied array.
protected CopyCountsInto ( long target ) : void
target long The array to write each count value into.
리턴 void

GetCountAtIndex() 보호된 메소드

Gets the number of recorded values at a given index.
protected GetCountAtIndex ( int index ) : long
index int The index to get the count for
리턴 long

IncrementCountAtIndex() 보호된 메소드

Increments the count at the given index. Will also increment the HistogramBase.TotalCount.
protected IncrementCountAtIndex ( int index ) : void
index int The index to increment the count at.
리턴 void

IntConcurrentHistogram() 공개 메소드

Construct a IntConcurrentHistogram given the lowest and highest values to be tracked and a number of significant decimal digits. Providing a lowestTrackableValue is useful is situations where the units used for the histogram's values are much smaller that the minimal accuracy required. For example when tracking time values stated in nanoseconds, where the minimal accuracy required is a microsecond, the proper value for lowestTrackableValue would be 1000.
public IntConcurrentHistogram ( long lowestTrackableValue, long highestTrackableValue, int numberOfSignificantValueDigits ) : System
lowestTrackableValue long /// The lowest value that can be tracked (distinguished from 0) by the histogram. /// Must be a positive integer that is >= 1. /// May be internally rounded down to nearest power of 2. ///
highestTrackableValue long The highest value to be tracked by the histogram. Must be a positive integer that is >= (2 * ).
numberOfSignificantValueDigits int The number of significant decimal digits to which the histogram will maintain value resolution and separation. /// Must be a non-negative integer between 0 and 5.
리턴 System

IntConcurrentHistogram() 공개 메소드

Construct a IntConcurrentHistogram given the lowest and highest values to be tracked and a number of significant decimal digits.
Providing a lowestTrackableValue is useful in situations where the units used for the histogram's values are much smaller that the minimal accuracy required. For example when tracking time values stated in ticks (100 nanoseconds), where the minimal accuracy required is a microsecond, the proper value for lowestTrackableValue would be 10.
public IntConcurrentHistogram ( long instanceId, long lowestTrackableValue, long highestTrackableValue, int numberOfSignificantValueDigits ) : System
instanceId long An identifier for this instance.
lowestTrackableValue long The lowest value that can be tracked (distinguished from 0) by the histogram. /// Must be a positive integer that is >= 1. /// May be internally rounded down to nearest power of 2. ///
highestTrackableValue long The highest value to be tracked by the histogram. /// Must be a positive integer that is >= (2 * lowestTrackableValue). ///
numberOfSignificantValueDigits int /// The number of significant decimal digits to which the histogram will maintain value resolution and separation. /// Must be a non-negative integer between 0 and 5. ///
리턴 System

SetCountAtIndex() 보호된 메소드

Sets the count at the given index.
protected SetCountAtIndex ( int index, long value ) : void
index int The index to be set
value long The value to set
리턴 void