Documentation ¶
Index ¶
- func NewMockDetection(anomaly *bool, metrics []string) detection.Detector
- type MockDetection
- func (m *MockDetection) Add(data detection.TimedData)
- func (m *MockDetection) AddAll(vals []detection.TimedData)
- func (m *MockDetection) IsAnomaly() (bool, error)
- func (m *MockDetection) Metrics() []string
- func (m *MockDetection) Name() string
- func (m *MockDetection) Reason() string
- func (m *MockDetection) SampleCount() int
- func (m *MockDetection) SampleDuration() time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MockDetection ¶
type MockDetection struct {
// contains filtered or unexported fields
}
MockDetection detection mock type
func (*MockDetection) Add ¶
func (m *MockDetection) Add(data detection.TimedData)
Add add detect data
func (*MockDetection) AddAll ¶
func (m *MockDetection) AddAll(vals []detection.TimedData)
AddAll add detect data array
func (*MockDetection) IsAnomaly ¶
func (m *MockDetection) IsAnomaly() (bool, error)
IsAnomaly checks if current values is anomaly
func (*MockDetection) Metrics ¶
func (m *MockDetection) Metrics() []string
Metrics return current detector metrics
func (*MockDetection) SampleCount ¶
func (m *MockDetection) SampleCount() int
SampleCount get current data count
func (*MockDetection) SampleDuration ¶
func (m *MockDetection) SampleDuration() time.Duration
SampleDuration get current data time range
Click to show internal directories.
Click to hide internal directories.