Class Histogram<TData1>
One-dimensional histogram for storing number of samples for a given dimension key
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Azos.Instrumentation.Analytics
Assembly: Azos.dll
Syntax
public class Histogram<TData1> : Histogram, IHistogram, IEnumerable<HistogramEntry>, IEnumerable
Type Parameters
Name | Description |
---|---|
TData1 |
Constructors
Histogram(String, Dimension<TData1>)
Constructs a histogram from a given array of dimensions
Declaration
public Histogram(string title, Dimension<TData1> dimension1)
Parameters
Type | Name | Description |
---|---|---|
System.String | title | Histogram title used for displaying result |
Dimension<TData1> | dimension1 | Dimension of the histogram dimension |
Fields
m_Dimension1
Declaration
protected Dimension<TData1> m_Dimension1
Field Value
Type | Description |
---|---|
Dimension<TData1> |
Properties
DimensionCount
Number of dimensions in this histogram
Declaration
public override int DimensionCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
Dimensions
Declaration
public override IEnumerable<Dimension> Dimensions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Dimension> |
Overrides
Item[Int32]
Return the sample count associated with given histogram keys
Declaration
public int this[int key] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | key |
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
Keys(TData1)
Convert a value to HistogramKeys struct
Declaration
public HistogramKeys Keys(TData1 value)
Parameters
Type | Name | Description |
---|---|---|
TData1 | value |
Returns
Type | Description |
---|---|
HistogramKeys |
Sample(TData1)
Increment histogram statistics for a given dimension value
Declaration
public virtual void Sample(TData1 value)
Parameters
Type | Name | Description |
---|---|---|
TData1 | value |
TryGet(Int32, out Int32)
Try to get the sample count associated with the given histogram key. If the key is not present in the histogram dictionary return false
Declaration
public bool TryGet(int key, out int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | key | |
System.Int32 | count |
Returns
Type | Description |
---|---|
System.Boolean |
Value(TData1)
Returns number of samples collected for a given key. The key is obtained by mapping the given value into the dimension's partition. Return value of 0 indicates that key is not present in the histogram
Declaration
public int Value(TData1 value)
Parameters
Type | Name | Description |
---|---|---|
TData1 | value |
Returns
Type | Description |
---|---|
System.Int32 |
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable