Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregatedDiscoveryMetrics ¶
type AggregatedDiscoveryMetrics struct { FirstSeen time.Time // timestamp of the first data seen LastSeen time.Time // timestamp of the last data seen CountDistinctInstanceKeys int // number of distinct Instances seen (note: this may not be true: distinct = succeeded + failed) CountDistinctOkInstanceKeys int // number of distinct Instances which succeeded CountDistinctFailedInstanceKeys int // number of distinct Instances which failed FailedDiscoveries uint64 // number of failed discoveries SuccessfulDiscoveries uint64 // number of successful discoveries InstancePollSecondsExceeded uint64 // number of times discoverInstance exceeded InstancePollSeconds MeanTotalSeconds float64 MeanBackendSeconds float64 MeanInstanceSeconds float64 FailedMeanTotalSeconds float64 FailedMeanBackendSeconds float64 FailedMeanInstanceSeconds float64 MaxTotalSeconds float64 MaxBackendSeconds float64 MaxInstanceSeconds float64 FailedMaxTotalSeconds float64 FailedMaxBackendSeconds float64 FailedMaxInstanceSeconds float64 MedianTotalSeconds float64 MedianBackendSeconds float64 MedianInstanceSeconds float64 FailedMedianTotalSeconds float64 FailedMedianBackendSeconds float64 FailedMedianInstanceSeconds float64 P95TotalSeconds float64 P95BackendSeconds float64 P95InstanceSeconds float64 FailedP95TotalSeconds float64 FailedP95BackendSeconds float64 FailedP95InstanceSeconds float64 }
AggregatedDiscoveryMetrics contains aggregated metrics for instance discovery. Called from api/discovery-metrics-aggregated?seconds=xxx
func AggregatedSince ¶
func AggregatedSince(c *collection.Collection, t time.Time) (AggregatedDiscoveryMetrics, error)
AggregatedSince returns a large number of aggregated metrics based on the raw metrics collected since the given time.
type Metric ¶
type Metric struct { Timestamp time.Time // time the collection was taken TabletAlias string // instance being monitored BackendLatency time.Duration // time taken talking to the backend InstanceLatency time.Duration // time taken talking to the instance TotalLatency time.Duration // total time taken doing the discovery Err error // error (if applicable) doing the discovery process InstancePollSecondsDurationCount uint64 // total numbers of times discoverInstance exceeded InstancePollSeconds }
Metric holds a set of information of instance discovery metrics
type Queue ¶
Queue contains information for managing discovery requests
func CreateOrReturnQueue ¶
CreateOrReturnQueue allows for creation of a new discovery queue or returning a pointer to an existing one given the name.
func (*Queue) Consume ¶
Consume fetches a key to process; blocks if queue is empty. Release must be called once after Consume.
func (*Queue) Push ¶
Push enqueues a key if it is not on a queue and is not being processed; silently returns otherwise.
type QueueMetric ¶
QueueMetric contains the queue's active and queued sizes