profiler

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const MaxTryCntSwap = 3

MaxTryCntSwap - max try const swap

Variables

This section is empty.

Functions

This section is empty.

Types

type Profiler

type Profiler interface {
	Start() time.Time
	End(time.Time) time.Duration
	Info() string
}

Profiler - Atomic Profiler interface (no mutex) SAVE FOR GOROUTINE!

func GetProfiler

func GetProfiler(name string) Profiler

GetProfiler - get profiler instance by name or create new

type Timer

type Timer interface {
	Start()
	End()
	GetDuration() time.Duration
	GetStartTime() time.Time
	GetEndTime() time.Time
	Info() string
}

Timer - time save profiler (no mutex) NOT SAFE FOR GOROUTINE!

func GetTimer

func GetTimer(name string) Timer

GetTimer - get timer instance by name or create new

Jump to

Keyboard shortcuts

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