metric

package
v0.0.0-...-2c9ee18 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

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, prefix 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 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 HTTPResponseTime

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

func (HTTPResponseTime) Emit

func (event HTTPResponseTime) 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