Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintSingleCall ¶
PrintSingleCall prints the time taken for a single call It should be used in a defer statement, like: defer PrintSingleCall(Start())
Types ¶
type TimeRepeatedCalls ¶
type TimeRepeatedCalls struct {
// contains filtered or unexported fields
}
TimeRepeatedCalls is a struct that stores the time taken for each call
func (TimeRepeatedCalls) Average ¶
func (t TimeRepeatedCalls) Average() time.Duration
Average returns the average time taken for each call
func (*TimeRepeatedCalls) Call ¶
func (t *TimeRepeatedCalls) Call(startTime time.Time)
Call stores the time taken for a single call It should be used in a defer statement, like: defer t.Call(Start())
func (TimeRepeatedCalls) Max ¶
func (t TimeRepeatedCalls) Max() time.Duration
Max returns the maximum time taken for a call
func (TimeRepeatedCalls) Min ¶
func (t TimeRepeatedCalls) Min() time.Duration
Min returns the minimum time taken for a call
func (TimeRepeatedCalls) PrintStats ¶
func (t TimeRepeatedCalls) PrintStats()
PrintStats prints the average, max, min and sum time taken for each call
func (TimeRepeatedCalls) Sum ¶
func (t TimeRepeatedCalls) Sum() time.Duration
Sum returns the sum of all the time taken for each call
Click to show internal directories.
Click to hide internal directories.