Documentation ¶
Index ¶
- func CalcEventCostUs(start, end rpcinfo.Event) uint64
- func Record(ctx context.Context, ri rpcinfo.RPCInfo, event stats.Event, err error)
- type Controller
- func (c *Controller) Append(col stats.Tracer)
- func (c *Controller) DoFinish(ctx context.Context, ri rpcinfo.RPCInfo, err error, logger klog.FormatLogger)
- func (c *Controller) DoStart(ctx context.Context, ri rpcinfo.RPCInfo, logger klog.FormatLogger) context.Context
- func (c *Controller) HasTracer() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcEventCostUs ¶
CalcEventCostUs calculates the duration between start and end and returns in microsecond.
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 ¶
func (c *Controller) DoStart(ctx context.Context, ri rpcinfo.RPCInfo, logger klog.FormatLogger) context.Context
DoStart starts the tracers.
func (*Controller) HasTracer ¶ added in v0.0.2
func (c *Controller) HasTracer() bool
Click to show internal directories.
Click to hide internal directories.