Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Case ¶
type Case interface {
prometheus.Collector
Name() string
Query(ctx context.Context, client v1.API, selectors string, start time.Time, duration time.Duration) ([]model.SamplePair, error)
ExpectedValueAt(time.Time) float64
Quantized(time.Duration) time.Duration
}
Case is a metric that can query itself.
func NewSimpleTestCase ¶
func NewSimpleTestCase(name string, f func(time.Time) float64) Case
NewSimpleTestCase makes a new simpleTestCase
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner runs a bunch of test cases, periodically checking their value.
func (*Runner) Collect ¶
func (r *Runner) Collect(c chan<- prometheus.Metric)
Collect implements prometheus.Collector.
type RunnerConfig ¶
type RunnerConfig struct {
MinTime TimeValue
ScrapeInterval time.Duration
// contains filtered or unexported fields
}
RunnerConfig is config, for the runner.
func (*RunnerConfig) RegisterFlags ¶
func (cfg *RunnerConfig) RegisterFlags(f *flag.FlagSet)
RegisterFlags does what it says.
type TimeValue ¶
type TimeValue struct {
time.Time
// contains filtered or unexported fields
}
TimeValue is a model.Time that can be used as a flag.
func NewTimeValue ¶
func NewTimeValue(t time.Time) TimeValue
NewTimeValue makes a new TimeValue; will round t down to the nearest midnight.
Click to show internal directories.
Click to hide internal directories.