profiling

package
v0.0.0-...-401de7c Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 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

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