Documentation ¶
Index ¶
Constants ¶
Variables ¶
View Source
var ( // Tags Tags' name in influxdb Tags = []Tag{Name, Metric, IsScheduled, Granularity, Kind} // Fields Fields' name in influxdb Fields = []Field{ModelId, PredictionId, Value} // MetricTypeCPUUsage Enum of tag "metric" MetricTypeCPUUsage MetricType = "cpu_usage_seconds_percentage" // MetricTypeMemoryUsage Enum of tag "metric" MetricTypeMemoryUsage MetricType = "memory_usage_bytes" // LocalMetricTypeToPkgMetricType Convert local package metric type to package alameda.datahub.metric.NodeMetricType LocalMetricTypeToPkgMetricType = map[MetricType]metric.NodeMetricType{ MetricTypeCPUUsage: metric.TypeNodeCPUUsageSecondsPercentage, MetricTypeMemoryUsage: metric.TypeNodeMemoryUsageBytes, } // PkgMetricTypeToLocalMetricType Convert package alameda.datahub.metric.NodeMetricType to local package metric type PkgMetricTypeToLocalMetricType = map[metric.NodeMetricType]MetricType{ metric.TypeNodeCPUUsageSecondsPercentage: MetricTypeCPUUsage, metric.TypeNodeMemoryUsageBytes: MetricTypeMemoryUsage, } )
Functions ¶
This section is empty.
Types ¶
type Entity ¶
type Entity struct { Timestamp time.Time Name *string Metric *MetricType IsScheduled *string ModelId *string PredictionId *string Value *string }
Entity Container prediction entity in influxDB
func NewEntityFromMap ¶
NewEntityFromMap Build entity from map
func (Entity) NodePrediction ¶
func (e Entity) NodePrediction() prediction.NodePrediction
NodePrediction Create container prediction base on entity
type MetricType ¶
type MetricType = string
Click to show internal directories.
Click to hide internal directories.