reporter

package
Version: v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

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

Counter simply counts requests

func NewCounter

func NewCounter(cfg config.CounterReporterConfig) *Counter

func (*Counter) Finalize

func (c *Counter) Finalize() error

func (*Counter) Flush

func (c *Counter) Flush() error

func (*Counter) GetLogger

func (c *Counter) GetLogger() *dlog.Logger

func (*Counter) JsonReport

func (c *Counter) JsonReport() interface{}

func (*Counter) LoggerIdentity

func (c *Counter) LoggerIdentity(justCallMe func() dlog.Identity) dlog.Identity

func (*Counter) Record

func (c *Counter) Record(res metrics.Response)

func (*Counter) Run

func (c *Counter) Run(ctx context.Context, resCh <-chan metrics.Response)

func (*Counter) SetLogger

func (c *Counter) SetLogger(logger *dlog.Logger)

func (*Counter) TextReport

func (c *Counter) TextReport() string

type Multi

type Multi struct {
}

type Sink

type Sink interface {
	// Run drain from response channel until it is closed or the context is canceled
	Run(ctx context.Context, resCh <-chan metrics.Response)
	// Record is not go routine safe, it is used for testing, and Run should call Record
	Record(res metrics.Response)
	// Finalize do the final calculation and called when manager know workers all finished
	Finalize() error
	// Flush send the data to underlying storage (i.e. TSDB) if any
	Flush() error
	// TextReport is a summary in plain text for printing on terminal
	TextReport() string
	// JsonReport is a summary in json for machine
	JsonReport() interface{}
}

type TSDB

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

TSDB writes results as time series

func NewTSDB

func NewTSDB(cfg config.TSDBReporterConfig, gcfg config.XephonBConfig) (*TSDB, error)

func (*TSDB) Finalize

func (d *TSDB) Finalize() error

func (*TSDB) Flush

func (d *TSDB) Flush() error

func (*TSDB) GetLogger

func (d *TSDB) GetLogger() *dlog.Logger

func (*TSDB) JsonReport

func (d *TSDB) JsonReport() interface{}

func (*TSDB) LoggerIdentity

func (d *TSDB) LoggerIdentity(justCallMe func() dlog.Identity) dlog.Identity

func (*TSDB) Record

func (d *TSDB) Record(res metrics.Response)

func (*TSDB) Run

func (d *TSDB) Run(ctx context.Context, resCh <-chan metrics.Response)

func (*TSDB) SetLogger

func (d *TSDB) SetLogger(logger *dlog.Logger)

func (*TSDB) TextReport

func (d *TSDB) TextReport() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL