metric

package
v0.0.0-...-7fe2d08 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DatabaseConnections = &Gauge{}
View Source
var DatabaseQueries = Meter(0)
View Source
var TrackedContainers = &Gauge{}
View Source
var TrackedVolumes = &Gauge{}

Functions

func CountQueries

func CountQueries(conn db.Conn) db.Conn

func Initialize

func Initialize(logger lager.Logger, riemannAddr string, host string, tags []string, attributes map[string]string)

func PeriodicallyEmit

func PeriodicallyEmit(logger lager.Logger, interval time.Duration)

func SetupConnectionCountingDriver

func SetupConnectionCountingDriver(delegateDriverName, sqlDataSource, newDriverName string)

func WrapHandler

func WrapHandler(logger lager.Logger, route string, handler http.Handler) http.Handler

Types

type BuildFinished

type BuildFinished struct {
	PipelineName  string
	JobName       string
	BuildName     string
	BuildID       int
	BuildStatus   db.Status
	BuildDuration time.Duration
}

func (BuildFinished) Emit

func (event BuildFinished) Emit(logger lager.Logger)

type BuildStarted

type BuildStarted struct {
	PipelineName string
	JobName      string
	BuildName    string
	BuildID      int
}

func (BuildStarted) Emit

func (event BuildStarted) Emit(logger lager.Logger)

type Conn

type Conn interface {
	Prepare(query string) (driver.Stmt, error)
	Close() error
	Begin() (driver.Tx, error)
}

type Driver

type Driver interface {
	Open(name string) (driver.Conn, error)
}

type Event

type Event interface {
	Emit(lager.Logger)
}

type Gauge

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

func (*Gauge) Dec

func (c *Gauge) Dec()

func (*Gauge) Inc

func (c *Gauge) Inc()

func (*Gauge) Max

func (c *Gauge) Max() int

type HTTPReponseTime

type HTTPReponseTime struct {
	Route    string
	Path     string
	Duration time.Duration
}

func (HTTPReponseTime) Emit

func (event HTTPReponseTime) Emit(logger lager.Logger)

type Meter

type Meter int64

func (*Meter) Delta

func (m *Meter) Delta() int

func (*Meter) Inc

func (m *Meter) Inc()

type MetricsHandler

type MetricsHandler struct {
	Logger lager.Logger

	Route   string
	Handler http.Handler
}

func (MetricsHandler) ServeHTTP

func (handler MetricsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type SchedulingFullDuration

type SchedulingFullDuration struct {
	PipelineName string
	Duration     time.Duration
}

func (SchedulingFullDuration) Emit

func (event SchedulingFullDuration) Emit(logger lager.Logger)

type SchedulingJobDuration

type SchedulingJobDuration struct {
	PipelineName string
	JobName      string
	Duration     time.Duration
}

func (SchedulingJobDuration) Emit

func (event SchedulingJobDuration) Emit(logger lager.Logger)

type SchedulingLoadVersionsDuration

type SchedulingLoadVersionsDuration struct {
	PipelineName string
	Duration     time.Duration
}

func (SchedulingLoadVersionsDuration) Emit

func (event SchedulingLoadVersionsDuration) Emit(logger lager.Logger)

type WorkerContainers

type WorkerContainers struct {
	WorkerName string
	Containers int
}

func (WorkerContainers) Emit

func (event WorkerContainers) Emit(logger lager.Logger)

Directories

Path Synopsis
This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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