metrics

package
v0.0.0-...-85469d9 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetMetrics

func SetMetrics(name string, details MetricDetails)

SetMetrics set new content to current metric

func SetMetricsCtx

func SetMetricsCtx(ctx *context.Context, name string, details MetricDetails)

SetMetricsCtx set new content to the current metric including context

Types

type MetricDetail

type MetricDetail struct {
	Ctx       context.Context `json:"context,omitempty"`
	Name      string          `json:"name"`
	Times     uint64          `json:"times"`
	Details   MetricDetails   `json:"details,omitempty"`
	StartedAt time.Time       `json:"started_at"`
	EndedAt   time.Time       `json:"ended_at"`
}

MetricDetail holds information about a metric

type MetricDetails

type MetricDetails []string

MetricDetails a list of metrics details

type Metrics

type Metrics map[string]MetricDetail

Metrics is a map for each type of action

Jump to

Keyboard shortcuts

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