stats

package
v0.0.0-...-d4f9e80 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL