profiling

package
v5.5.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: BSD-3-Clause, BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FinFn added in v1.0.46

type FinFn func()

type SilentTimeTracer

type SilentTimeTracer struct{}

func NewSilentTimeTracer

func NewSilentTimeTracer() *SilentTimeTracer

func (*SilentTimeTracer) Finish

func (t *SilentTimeTracer) Finish()

func (*SilentTimeTracer) Stage

func (t *SilentTimeTracer) Stage(format string, args ...interface{})

type TimeBuckets

type TimeBuckets struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewTimeBuckets

func NewTimeBuckets(clock clockwork.Clock, log logger.Logger) *TimeBuckets

func WithTimeBuckets

func WithTimeBuckets(ctx context.Context, clock clockwork.Clock, log logger.Logger) (context.Context, *TimeBuckets)

func (*TimeBuckets) Get

func (t *TimeBuckets) Get(bucketName string) time.Duration

func (*TimeBuckets) Log

func (t *TimeBuckets) Log(ctx context.Context, bucketName string)

func (*TimeBuckets) LogIfNonZero

func (t *TimeBuckets) LogIfNonZero(ctx context.Context, bucketName string)

func (*TimeBuckets) Record

func (t *TimeBuckets) Record(bucketName string) FinFn

type TimeTracer

type TimeTracer interface {
	Stage(format string, args ...interface{})
	Finish()
}

func NewTimeTracer

func NewTimeTracer(ctx context.Context, log logger.Logger, clock clockwork.Clock, label string) TimeTracer

type TimeTracerImpl

type TimeTracerImpl struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*TimeTracerImpl) Finish

func (t *TimeTracerImpl) Finish()

func (*TimeTracerImpl) Stage

func (t *TimeTracerImpl) Stage(format string, args ...interface{})

Jump to

Keyboard shortcuts

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