stats

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

Reporter holds cached metric objects to report queue proxy metrics.

func NewStatsReporter

func NewStatsReporter(ns, service, config, rev string, countMetric *stats.Int64Measure,
	latencyMetric *stats.Float64Measure, queueSizeMetric *stats.Int64Measure) (*Reporter, error)

NewStatsReporter creates a reporter that collects and reports queue proxy metrics.

func (*Reporter) ReportQueueDepth added in v0.9.0

func (r *Reporter) ReportQueueDepth(d int) error

ReportQueueDepth captures response time requests

func (*Reporter) ReportRequestCount

func (r *Reporter) ReportRequestCount(responseCode int) error

ReportRequestCount captures request count metric.

func (*Reporter) ReportResponseTime

func (r *Reporter) ReportResponseTime(responseCode int, d time.Duration) error

ReportResponseTime captures response time requests

type StatsReporter

type StatsReporter interface {
	ReportRequestCount(responseCode int) error
	ReportResponseTime(responseCode int, d time.Duration) error
	ReportQueueDepth(depth int) error
}

StatsReporter defines the interface for sending queue proxy metrics.

Jump to

Keyboard shortcuts

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