Documentation ¶
Index ¶
- Constants
- Variables
- func BenchmarkAllLogs()
- func BenchmarkLogError()
- func BenchmarkLogErrorf()
- func BenchmarkLogInfo()
- func BenchmarkLogInfof()
- func BenchmarkLogNoFmt()
- func BenchmarkLogNoFmtf()
- func BenchmarkLogWarn()
- func BenchmarkLogWarnf()
- func PrintCPUInfo()
- func PrintCPUUsage()
- func PrintCaller()
- func PrintDiskInfo()
- func PrintMemInfo()
- func PrintMemUsage()
- func PrintOSInfo()
- func PrintProcessInfo()
- func PrintSystemInfo()
- type StopWatch
Constants ¶
View Source
const ( //ToNanoSeconds value 1 ToNanoSeconds int64 = 1 //ToMicroSeconds converts nano seconds to micro seconds ToMicroSeconds int64 = 1000 //ToMilliSeconds converts nano seconds to milli seconds ToMilliSeconds int64 = ToMicroSeconds * 1000 //ToSeconds converts nano seconds to seconds ToSeconds int64 = ToMilliSeconds * 1000 )
Variables ¶
View Source
var TimeFactor = ToNanoSeconds
TimeFactor sets time unit to show in benchmark.
Functions ¶
func BenchmarkLogError ¶
func BenchmarkLogError()
BenchmarkLogError checks prints timing for Error()
func BenchmarkLogErrorf ¶
func BenchmarkLogErrorf()
BenchmarkLogErrorf checks prints timing for Errorf()
func BenchmarkLogInfof ¶
func BenchmarkLogInfof()
BenchmarkLogInfof checks prints timing for Infof()
func BenchmarkLogNoFmt ¶
func BenchmarkLogNoFmt()
BenchmarkLogNoFmt checks prints timing for NoFmt()
func BenchmarkLogNoFmtf ¶
func BenchmarkLogNoFmtf()
BenchmarkLogNoFmtf checks prints timing for NoFmtf()
func BenchmarkLogWarnf ¶
func BenchmarkLogWarnf()
BenchmarkLogWarnf checks prints timing for Warnf()
func PrintMemUsage ¶
func PrintMemUsage()
PrintMemUsage prints information about memory used by the application
func PrintProcessInfo ¶
func PrintProcessInfo()
PrintProcessInfo prints information about the current running process
func PrintSystemInfo ¶
func PrintSystemInfo()
PrintSystemInfo prints the system information. CPU, memory, disk...
Types ¶
type StopWatch ¶
type StopWatch struct {
// contains filtered or unexported fields
}
StopWatch used to time things with Begin() and GetTime()
func (*StopWatch) GetTimeNanoSec ¶
GetTimeNanoSec returns time elaplsed since Begin in Nanoseconds
Click to show internal directories.
Click to hide internal directories.