-
Notifications
You must be signed in to change notification settings - Fork 30
/
IRecorder.cs
40 lines (38 loc) · 2.39 KB
/
IRecorder.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
namespace HdrHistogram
{
/// <summary>
/// Provides methods to record values.
/// </summary>
public interface IRecorder
{
/// <summary>
/// Records a value in the histogram
/// </summary>
/// <param name="value">The value to be recorded</param>
/// <exception cref="System.IndexOutOfRangeException">if value is exceeds highestTrackableValue</exception>
void RecordValue(long value);
/// <summary>
/// Record a value in the histogram (adding to the value's current count)
/// </summary>
/// <param name="value">The value to be recorded</param>
/// <param name="count">The number of occurrences of this value to record</param>
/// <exception cref="System.IndexOutOfRangeException">if value is exceeds highestTrackableValue</exception>
void RecordValueWithCount(long value, long count);
/// <summary>
/// Record a value in the histogram.
/// </summary>
/// <param name="value">The value to record</param>
/// <param name="expectedIntervalBetweenValueSamples">If <paramref name="expectedIntervalBetweenValueSamples"/> is larger than 0, add auto-generated value records as appropriate if <paramref name="value"/> is larger than <paramref name="expectedIntervalBetweenValueSamples"/></param>
/// <exception cref="System.IndexOutOfRangeException">if value is exceeds highestTrackableValue</exception>
/// <remarks>
/// To compensate for the loss of sampled values when a recorded value is larger than the expected interval between value samples,
/// Histogram will auto-generate an additional series of decreasingly-smaller (down to the expectedIntervalBetweenValueSamples) value records.
/// <para>
/// Note: This is a at-recording correction method, as opposed to the post-recording correction method provided by currently unimplemented <c>CopyCorrectedForCoordinatedOmission</c> method.
/// The two methods are mutually exclusive, and only one of the two should be be used on a given data set to correct for the same coordinated omission issue.
/// </para>
/// See notes in the description of the Histogram calls for an illustration of why this corrective behavior is important.
/// </remarks>
void RecordValueWithExpectedInterval(long value, long expectedIntervalBetweenValueSamples);
}
}