Documentation ¶
Overview ¶
Package callstat provides a few convenient types for tracking function call statistics. It is useful for any system that tracks local or remote procedure call durations or automatically retries failed calls.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Call ¶
type Call struct { // Description is a textual description of the call. Description string // Start is the time at which the call started. Start time.Time // End is the time at which the call ended or timed out. End time.Time // Err is the error returned from unsuccessful calls. Err error // Inner is the set of internal subcalls that were made as part of the call. Inner []Call }
Call represents information about a function call.
func (*Call) Begin ¶
Begin sets the call description and records the current time as the start of the call.
func (*Call) Complete ¶
Complete sets the call error state and records the current time as the end of the call.
If the call was not previously started, Complete assumes that the start and end times of the call are equal.
Click to show internal directories.
Click to hide internal directories.