Class Dimension
Base class of a histogram dimension. of data type TData partitions a range defined by MinValue and MaxValue, by mapping the given value into [0 ... PartitionCount] partitions
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: Azos.Instrumentation.Analytics
Assembly: Azos.dll
Syntax
public abstract class Dimension
Constructors
Dimension(String, Int32, PartitionNameFunc)
Creates histogram dimension instance. If partitionFunc is null then DoPartition must be overriden in the derived class
Declaration
public Dimension(string name, int partCount, PartitionNameFunc partitionNameFunc = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Description of this dimension used in reporting |
System.Int32 | partCount | Total number of partitions |
PartitionNameFunc | partitionNameFunc | Used to inject a function in order not to override this class |
Fields
DEFAULT_PARTITION_NAMES
Declaration
public static readonly string[] DEFAULT_PARTITION_NAMES
Field Value
Type | Description |
---|---|
System.String[] |
Name
Provides meaningful name for displaying
Declaration
public readonly string Name
Field Value
Type | Description |
---|---|
System.String |
PartitionCount
Number of partitions in
Declaration
public readonly int PartitionCount
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
DataType
Returns the type of data that this instance partitions
Declaration
public abstract Type DataType { get; }
Property Value
Type | Description |
---|---|
System.Type |
Index
Index of this dimension in the histogram
Declaration
public int Index { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
DoPartitionName(Int32)
Override to implement a custom mapping logic to return the names of a given partition when its not passed in the .ctor
Declaration
protected virtual string DoPartitionName(int idx)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | idx |
Returns
Type | Description |
---|---|
System.String |
GetPartitionName(Int32)
Returns the name of a partition identified by idx
Declaration
public string GetPartitionName(int idx)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | idx |
Returns
Type | Description |
---|---|
System.String |