Documentation ¶
Index ¶
- func GetDelta(start, end time.Time, format time.Duration) float64
- func GetDeltaInMillisec(start, end int64) float64
- func GetDeltaInNanos(start, end int64) float64
- func GetDeltaInSec(start, end int64) float64
- func ShortTimeMeasure(messagePrefix string, loggingFunc func(format string, args ...interface{})) func()
- type TimeMeasure
- func (t *TimeMeasure) GetDelta() time.Duration
- func (t *TimeMeasure) GetDeltaInMil() decimal.Decimal
- func (t *TimeMeasure) GetDeltaInNanos() int64
- func (t *TimeMeasure) GetDeltaInSec() decimal.Decimal
- func (t *TimeMeasure) GetStart() time.Time
- func (t *TimeMeasure) GetStop() time.Time
- func (t *TimeMeasure) StopAndLogTimeMeasure(messagePrefix string, loggingFunc func(format string, args ...interface{}))
- func (t *TimeMeasure) StopTimeMeasure()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDelta ¶
GetDelta returns the delta between two time.Time in the time.Duration specified. If time.Duration is not supported, the func will return seconds per default.
func GetDeltaInMillisec ¶
func GetDeltaInNanos ¶
func GetDeltaInSec ¶
func ShortTimeMeasure ¶
func ShortTimeMeasure(messagePrefix string, loggingFunc func(format string, args ...interface{})) func()
WARN: This method is made on purpose all-in-line to avoid useless allocations and resources usage
Types ¶
type TimeMeasure ¶
type TimeMeasure struct {
// contains filtered or unexported fields
}
func StartTimeMeasure ¶
func StartTimeMeasure() *TimeMeasure
func (*TimeMeasure) GetDelta ¶
func (t *TimeMeasure) GetDelta() time.Duration
func (*TimeMeasure) GetDeltaInMil ¶
func (t *TimeMeasure) GetDeltaInMil() decimal.Decimal
func (*TimeMeasure) GetDeltaInNanos ¶
func (t *TimeMeasure) GetDeltaInNanos() int64
func (*TimeMeasure) GetDeltaInSec ¶
func (t *TimeMeasure) GetDeltaInSec() decimal.Decimal
func (*TimeMeasure) GetStart ¶
func (t *TimeMeasure) GetStart() time.Time
func (*TimeMeasure) GetStop ¶
func (t *TimeMeasure) GetStop() time.Time
func (*TimeMeasure) StopAndLogTimeMeasure ¶
func (t *TimeMeasure) StopAndLogTimeMeasure(messagePrefix string, loggingFunc func(format string, args ...interface{}))
func (*TimeMeasure) StopTimeMeasure ¶
func (t *TimeMeasure) StopTimeMeasure()
Click to show internal directories.
Click to hide internal directories.