Documentation ¶
Overview ¶
Package query provdes query metrics with this file providing aggregared metrics based on the underlying values.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregatedQueryMetrics ¶
type AggregatedQueryMetrics struct { // fill me in here Count int MaxLatencySeconds float64 MeanLatencySeconds float64 MedianLatencySeconds float64 P95LatencySeconds float64 MaxWaitSeconds float64 MeanWaitSeconds float64 MedianWaitSeconds float64 P95WaitSeconds float64 }
func AggregatedSince ¶
func AggregatedSince(c *collection.Collection, t time.Time) AggregatedQueryMetrics
AggregatedSince returns the aggregated query metrics for the period given from the values provided.
type Metric ¶
type Metric struct { Timestamp time.Time // time the metric was started WaitLatency time.Duration // time that we had to wait before starting query execution ExecuteLatency time.Duration // time the query took to execute Err error // any error resulting from the query execution }
Metric records query metrics of backend writes that go through a sized channel. It allows us to compare the time waiting to execute the query against the time needed to run it and in a "sized channel" the wait time may be significant and is good to measure.
Click to show internal directories.
Click to hide internal directories.