query

package
v0.20.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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.

func NewMetric

func NewMetric() *Metric

NewMetric returns a new metric with timestamp starting from now

func (Metric) When

func (m Metric) When() time.Time

When records the timestamp of the start of the recording

Jump to

Keyboard shortcuts

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