Documentation
¶
Index ¶
- Constants
- func StartMemoryWatcher(ctx context.Context, interval time.Duration) (read chan MemStats)
- type Benchmark
- type Fields3
- type Fields10
- type FnError
- type FnInfo
- type FnInfoFmt
- type FnInfoWith3
- type FnInfoWith10
- type FnInfoWith10Exist
- type FnInfoWithErrorStack
- type MemStats
- type Setup
- type Statistics
Constants ¶
const ( // LevelInfo represents the name of the info-level LevelInfo = "info" // LevelError represents the name of the error-level LevelError = "error" // LevelDebug represents the name of the debug-level LevelDebug = "debug" // FieldTime represents the name of the time field FieldTime = "time" // FieldLevel represents the name of the level field FieldLevel = "level" // FieldError represents the name of the error field FieldError = "error" // FieldMessage represents the name of the message field FieldMessage = "message" // LogOperationInfo represents the name of an info-log operation LogOperationInfo = "info" // LogOperationInfoFmt represents the name of an info-log operation // involving formatting LogOperationInfoFmt = "info_fmt" // LogOperationInfoWithErrorStack represents the name of an info-log // operation involving a stack-traced error value LogOperationInfoWithErrorStack = "info_with_error_stack" // LogOperationInfoWith3 represents the name of an info-log operation // involving 3 newly appended fields LogOperationInfoWith3 = "info_with_3" // LogOperationInfoWith10 represents the name of an info-log operation // involving 10 newly appended fields LogOperationInfoWith10 = "info_with_10" // LogOperationError represents the name of an error-log operation LogOperationError = "error" // LogOperationInfoWith10Exist represents the name of an info-log operation // involving 10 previously appended fields LogOperationInfoWith10Exist = "info_with_10_exist" // TimeFormat defines the time logging format TimeFormat = "2006-01-02T15:04:05.999999999-07:00" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Benchmark ¶
type Benchmark struct {
// contains filtered or unexported fields
}
Benchmark is a log benchmark
type Fields3 ¶
type Fields3 struct {
Name1 string
Name2 string
Name3 string
Value1 string
Value2 int
Value3 float64
}
Fields3 is a list of 3 fields and their according values
type Fields10 ¶
type Fields10 struct {
Name1 string
Name2 string
Name3 string
Name4 string
Name5 string
Name6 string
Name7 string
Name8 string
Name9 string
Name10 string
Value1 string
Value2 string
Value3 string
Value4 bool
Value5 string
Value6 int
Value7 float64
Value8 []string
Value9 []int
Value10 []float64
}
Fields10 is a list of 10 fields and their according values
func NewFields10 ¶
func NewFields10() *Fields10
NewFields10 creates a new instance of a set of 10 fields
type FnInfoWith3 ¶
FnInfoWith3 represents an info logging callback function with 3 data fields attached
type FnInfoWith10 ¶
FnInfoWith10 represents an info logging callback function with 10 data fields attached
type FnInfoWith10Exist ¶
type FnInfoWith10Exist func(msg string)
FnInfoWith10Exist represents an info logging callback function with 10 previously attached data fields
type FnInfoWithErrorStack ¶
FnInfoWithErrorStack represents an info logging callback function with a stack-traced error attached
type MemStats ¶
type MemStats struct {
StatSamples uint
HeapAllocInc uint64
HeapObjectsInc uint64
HeapSysInc uint64
MaxHeapAlloc uint64
MaxHeapObjects uint64
MaxHeapSys uint64
}
MemStats represents memory related statistics
type Setup ¶
type Setup struct {
Info func(io.ReadWriter) (FnInfo, error)
InfoFmt func(io.ReadWriter) (FnInfoFmt, error)
Error func(io.ReadWriter) (FnError, error)
InfoWithErrorStack func(io.ReadWriter) (FnInfoWithErrorStack, error)
InfoWith3 func(io.ReadWriter) (FnInfoWith3, error)
InfoWith10 func(io.ReadWriter) (FnInfoWith10, error)
InfoWith10Exist func(io.ReadWriter) (FnInfoWith10Exist, error)
}
Setup defines the callback functions for all benchmarked cases
type Statistics ¶
Statistics are the statistics of the execution of a benchmark