stats

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package stats provides functionality for basic usage statistics in Gordon.

Index

Constants

This section is empty.

Variables

View Source
var (
	// GordonVersion contains the current version of gordon
	GordonVersion = ""
)

Functions

func InitTasks

func InitTasks(tasks map[string]config.Task)

InitTasks initialises the counters for the defined task-types.

func Setup added in v1.6.0

func Setup(c config.StatsConfig)

Setup will initialize the stats-package to be able to record statistics within the taskqueue application.

Types

type Transaction added in v1.6.0

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

A Transaction allows tracking executions of tasks.

func NewTransaction added in v1.6.0

func NewTransaction(name string) (t Transaction)

NewTransaction creates and returns a new transaction instance.

func StartedTask added in v1.6.0

func StartedTask(task string) Transaction

StartedTask handles stats when a task was started.

func (Transaction) End added in v1.6.0

func (t Transaction) End()

End will mark the end of the execution of a task.

func (Transaction) NoticeError added in v1.6.0

func (t Transaction) NoticeError(err error)

NoticeError will mark the transaction as erroneous and will add the provided error to the transaction information.

Jump to

Keyboard shortcuts

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