Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrafanaQueries ¶
type GrafanaQueries struct {
// QueryGroup is the general category for these queries.
QueryGroup string
// Queries is a list of Grafana dashboard compatible queries.
Queries []GrafanaQuery
// Index is this query group's index.
Index int
}
GrafanaQueries is a list of Grafana dashboard compatible queries.
func ParseFileToGrafanaQueries ¶
func ParseFileToGrafanaQueries( fileName string, log *zap.Logger, ) ([]GrafanaQueries, error)
ParseFileToGrafanaQueries parses a JSON queries file into Grafana dashboard compatible queries.
type GrafanaQuery ¶
type GrafanaQuery struct {
// Query is the query.
Query string
// Interval is the step size.
Interval string
// Index is this query's index.
Index int
// Left indicates if this panel is on the left.
Left bool
}
GrafanaQuery is a Grafana dashboard compatible query.
type InputQuery ¶
type InputQuery struct {
// QueryGroup is the general category for these queries.
QueryGroup string `json:"queryGroup"`
// Queries is the list of raw queries.
Queries []string `json:"queries"`
// Steps is the list of step sizes for these queries.
Steps []string `json:"steps"`
// Reruns is the number of times to rerun this query group.
Reruns int `json:"reruns"`
}
InputQuery is the JSON representation of a query to be compared.
type PromQLQueryGroup ¶
type PromQLQueryGroup struct {
// QueryGroup is the general category for these queries.
QueryGroup string
// Queries is a list of PromQL compatible queries.
Queries []string
// Reruns is the number of times to rerun this query group.
Reruns int
}
PromQLQueryGroup is a list of constructed PromQL query groups.
func ParseFileToPromQLQueryGroup ¶
func ParseFileToPromQLQueryGroup( fileName string, start int64, end int64, log *zap.Logger, ) ([]PromQLQueryGroup, error)
ParseFileToPromQLQueryGroup parses a JSON queries file into PromQL query groups.
type PromQLRegressionQueryGroup ¶
type PromQLRegressionQueryGroup struct {
PromQLQueryGroup
Retries int
Data []parser.Series
}
PromQLRegressionQueryGroup is a PromQLQueryGroup with a given data set.
func ParseRegressionFilesToPromQLQueryGroup ¶
func ParseRegressionFilesToPromQLQueryGroup( directory string, log *zap.Logger, ) ([]PromQLRegressionQueryGroup, error)
ParseRegressionFilesToPromQLQueryGroup parses a directory with regression query files into PromQL query groups.
type RegressionQuery ¶
type RegressionQuery struct {
Name string `json:"name"`
Query string `json:"query"`
StartSeconds int64 `json:"startSeconds"`
EndSeconds int64 `json:"endSeconds"`
Step int `json:"step"`
Retries int `json:"retries"`
Data []parser.Series `json:"data"`
}
RegressionQuery is the JSON representation of a query to be compared.