Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExportedMetrics ¶
type ExportedMetrics struct { Elapsed time.Duration // processed is the number of queries successfully processed. Processed int // errors is the number of queries that failed. Errors int // Latencies contain per query latency Latencies []float64 }
ExportedMetrics holds the basic metrics returned by the query engine
func (*ExportedMetrics) AggregateLatencies ¶
func (m *ExportedMetrics) AggregateLatencies() *LatencyStats
AggregateLatencies aggregates query latency metrics
func (*ExportedMetrics) QPSTotal ¶
func (m *ExportedMetrics) QPSTotal() (q float64)
QPSTotal returns the number of queries processed in one second.
type LatencyStats ¶
type LatencyStats struct { Min float64 Max float64 Mean float64 Median float64 Lowerq float64 Upperq float64 Average float64 }
LatencyStats stores latency data statistics
type Reporter ¶
type Reporter interface { ReportMetrics(*ExportedMetrics) error Initialize() error }
Reporter is used to report stats
Click to show internal directories.
Click to hide internal directories.