stats

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcEventCostUs

func CalcEventCostUs(start, end rpcinfo.Event) uint64

CalcEventCostUs calculates the duration between start and end and returns in microsecond.

func Record

func Record(ctx context.Context, ri rpcinfo.RPCInfo, event stats.Event, err error)

Record records the event to RPCStats.

Types

type Controller

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

Controller controls tracers.

func (*Controller) Append

func (c *Controller) Append(col stats.Tracer)

Append appends a new tracer to the controller.

func (*Controller) DoFinish

func (c *Controller) DoFinish(ctx context.Context, ri rpcinfo.RPCInfo, err error, logger klog.FormatLogger)

DoFinish calls the tracers in reversed order.

func (*Controller) DoStart

DoStart starts the tracers.

func (*Controller) HasTracer added in v0.0.2

func (c *Controller) HasTracer() bool

Jump to

Keyboard shortcuts

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