Documentation ¶
Index ¶
- Constants
- func GetAllCPUMetrics() []string
- func GetCPUMetricsLen() int
- func GetCPUMetricsSlice(numMetrics int) ([]string, error)
- func GetDoubleGroupByLabel(dbName string, numMetrics int) string
- func GetHighCPULabel(dbName string, nHosts int) (string, error)
- func GetMaxAllLabel(dbName string, nHosts int) string
- func NewGroupBy(numMetrics int) utils.QueryFillerMaker
- func NewGroupByOrderByLimit(core utils.QueryGenerator) utils.QueryFiller
- func NewHighCPU(hosts int) utils.QueryFillerMaker
- func NewLastPointPerHost(core utils.QueryGenerator) utils.QueryFiller
- func NewMaxAllCPU(hosts int) utils.QueryFillerMaker
- func NewSingleGroupby(metrics, hosts, hours int) utils.QueryFillerMaker
- type Core
- type DoubleGroupbyFiller
- type GroupByOrderByLimit
- type Groupby
- type GroupbyOrderbyLimitFiller
- type HighCPU
- type HighCPUFiller
- type LastPointFiller
- type LastPointPerHost
- type MaxAllCPU
- type MaxAllFiller
- type SingleGroupby
- type SingleGroupbyFiller
Constants ¶
const ( // TableName is the name of the table where the time series data is stored for devops use case. TableName = "cpu" // DoubleGroupByDuration is the how big the time range for DoubleGroupBy query is DoubleGroupByDuration = 12 * time.Hour // HighCPUDuration is the how big the time range for HighCPU query is HighCPUDuration = 12 * time.Hour // MaxAllDuration is the how big the time range for MaxAll query is MaxAllDuration = 8 * time.Hour // LabelSingleGroupby is the label prefix for queries of the single groupby variety LabelSingleGroupby = "single-groupby" // LabelDoubleGroupby is the label prefix for queries of the double groupby variety LabelDoubleGroupby = "double-groupby" // LabelLastpoint is the label for the lastpoint query LabelLastpoint = "lastpoint" // LabelMaxAll is the label prefix for queries of the max all variety LabelMaxAll = "cpu-max-all" // LabelGroupbyOrderbyLimit is the label for groupby-orderby-limit query LabelGroupbyOrderbyLimit = "groupby-orderby-limit" // LabelHighCPU is the prefix for queries of the high-CPU variety LabelHighCPU = "high-cpu" )
Variables ¶
This section is empty.
Functions ¶
func GetAllCPUMetrics ¶
func GetAllCPUMetrics() []string
GetAllCPUMetrics returns all the metrics for CPU
func GetCPUMetricsLen ¶
func GetCPUMetricsLen() int
GetCPUMetricsLen returns the number of metrics in CPU
func GetCPUMetricsSlice ¶
GetCPUMetricsSlice returns a subset of metrics for the CPU
func GetDoubleGroupByLabel ¶
GetDoubleGroupByLabel returns the Query human-readable label for DoubleGroupBy queries
func GetHighCPULabel ¶
GetHighCPULabel returns the Query human-readable label for HighCPU queries
func GetMaxAllLabel ¶
GetMaxAllLabel returns the Query human-readable label for MaxAllCPU queries
func NewGroupBy ¶
func NewGroupBy(numMetrics int) utils.QueryFillerMaker
NewGroupBy produces a function that produces a new Groupby for the given parameters
func NewGroupByOrderByLimit ¶
func NewGroupByOrderByLimit(core utils.QueryGenerator) utils.QueryFiller
NewGroupByOrderByLimit returns a new GroupByOrderByLimit for given paremeters
func NewHighCPU ¶
func NewHighCPU(hosts int) utils.QueryFillerMaker
NewHighCPU produces a new function that produces a new HighCPU
func NewLastPointPerHost ¶
func NewLastPointPerHost(core utils.QueryGenerator) utils.QueryFiller
NewLastPointPerHost returns a new LastPointPerHost for given paremeters
func NewMaxAllCPU ¶
func NewMaxAllCPU(hosts int) utils.QueryFillerMaker
NewMaxAllCPU produces a new function that produces a new AllMaxCPU
func NewSingleGroupby ¶
func NewSingleGroupby(metrics, hosts, hours int) utils.QueryFillerMaker
NewSingleGroupby produces a new function that produces a new SingleGroupby
Types ¶
type Core ¶
Core is the common component of all generators for all systems
type DoubleGroupbyFiller ¶
DoubleGroupbyFiller is a type that can fill in a double groupby query
type GroupByOrderByLimit ¶
type GroupByOrderByLimit struct {
// contains filtered or unexported fields
}
GroupByOrderByLimit produces a filler for queries in the devops groupby-orderby-limit case.
type Groupby ¶
type Groupby struct {
// contains filtered or unexported fields
}
Groupby produces a QueryFiller for the devops groupby case.
type GroupbyOrderbyLimitFiller ¶
GroupbyOrderbyLimitFiller is a type that can fill in a groupby-orderby-limit query
type HighCPU ¶
type HighCPU struct {
// contains filtered or unexported fields
}
HighCPU produces a QueryFiller for the devops high-cpu cases
type HighCPUFiller ¶
HighCPUFiller is a type that can fill in a high-cpu query
type LastPointFiller ¶
LastPointFiller is a type that can fill in a last point query
type LastPointPerHost ¶
type LastPointPerHost struct {
// contains filtered or unexported fields
}
LastPointPerHost returns QueryFiller for the devops lastpoint case
type MaxAllCPU ¶
type MaxAllCPU struct {
// contains filtered or unexported fields
}
MaxAllCPU contains info for filling in a query.Query for "max all" queries
type MaxAllFiller ¶
MaxAllFiller is a type that can fill in a max all CPU metrics query
type SingleGroupby ¶
type SingleGroupby struct {
// contains filtered or unexported fields
}
SingleGroupby contains info for filling in single groupby queries