debug

package
v0.0.0-...-b98a06e Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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 BenchmarkAllLogs

func BenchmarkAllLogs()

BenchmarkAllLogs ...does what it says...

func BenchmarkLogError

func BenchmarkLogError()

BenchmarkLogError checks prints timing for Error()

func BenchmarkLogErrorf

func BenchmarkLogErrorf()

BenchmarkLogErrorf checks prints timing for Errorf()

func BenchmarkLogInfo

func BenchmarkLogInfo()

BenchmarkLogInfo checks prints timing for Info()

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 BenchmarkLogWarn

func BenchmarkLogWarn()

BenchmarkLogWarn checks prints timing for Warn()

func BenchmarkLogWarnf

func BenchmarkLogWarnf()

BenchmarkLogWarnf checks prints timing for Warnf()

func PrintCPUInfo

func PrintCPUInfo()

PrintCPUInfo prints detailed information about the cpu

func PrintCPUUsage

func PrintCPUUsage()

PrintCPUUsage prints cpu used by the system.

func PrintCaller

func PrintCaller()

PrintCaller prints the values of runtime.Caller

func PrintDiskInfo

func PrintDiskInfo()

PrintDiskInfo prints information about the disk

func PrintMemInfo

func PrintMemInfo()

PrintMemInfo prints information about system memory

func PrintMemUsage

func PrintMemUsage()

PrintMemUsage prints information about memory used by the application

func PrintOSInfo

func PrintOSInfo()

PrintOSInfo prints information about the OS and architecture

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) Begin

func (s *StopWatch) Begin()

Begin starts recording time

func (*StopWatch) GetTimeNanoSec

func (s *StopWatch) GetTimeNanoSec() int64

GetTimeNanoSec returns time elaplsed since Begin in Nanoseconds

Jump to

Keyboard shortcuts

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