Documentation ¶
Overview ¶
Tracer provides a concrete Tracer implementation. Tracer is designed to provide access to timers quickly in high read contention scenarios. Depends on github.com/rcrowley/go-metrics
Index ¶
- type TracedFunc
- type Tracer
- func (t *Tracer) Count() int64
- func (t *Tracer) GetOrRegister(pathComponent string) *Tracer
- func (t *Tracer) GetRegistry() metrics.Registry
- func (t *Tracer) Max() int64
- func (t *Tracer) Mean() float64
- func (t *Tracer) Min() int64
- func (t *Tracer) Path() string
- func (t *Tracer) Percentile(p float64) float64
- func (t *Tracer) Percentiles(pcts []float64) []float64
- func (t *Tracer) Rate1() float64
- func (t *Tracer) Rate15() float64
- func (t *Tracer) Rate5() float64
- func (t *Tracer) RateMean() float64
- func (t *Tracer) Snapshot() metrics.Timer
- func (t *Tracer) StdDev() float64
- func (t *Tracer) Sum() int64
- func (t *Tracer) Time(f func())
- func (t *Tracer) TimeFunc(pathComponent string, tracedFunc TracedFunc)
- func (t *Tracer) Update(d time.Duration)
- func (t *Tracer) UpdateSince(since time.Time)
- func (t *Tracer) Variance() float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tracer ¶
type Tracer struct {
// contains filtered or unexported fields
}
Tracer is a struct that implements the `metrics.Timer` interface and provides hooks for timing blocks of code.
func (*Tracer) GetOrRegister ¶
func (*Tracer) GetRegistry ¶
func (t *Tracer) GetRegistry() metrics.Registry
func (*Tracer) Percentile ¶
func (*Tracer) Percentiles ¶
func (*Tracer) TimeFunc ¶
func (t *Tracer) TimeFunc(pathComponent string, tracedFunc TracedFunc)
TimeFunc times the function passed in, with the path of the current Tracer, appending ".pathComponent" to its trace path. The tracer passed to `tracedFunc` can be used to further add to the trace.
func (*Tracer) UpdateSince ¶
Click to show internal directories.
Click to hide internal directories.