Documentation
¶
Overview ¶
Package gilk implements functions to deal with query profiling.
Index ¶
Constants ¶
View Source
const ( // Enabled makes contexts to be cached and served Enabled modeType = "Enabled" // Disabled makes contexts not cached nor served Disabled modeType = "Disabled" )
Variables ¶
View Source
var ( // QueryGreenColorLatency defines the green color maximum // latency threshold for a single query QueryGreenColorLatency = 100 * time.Millisecond // QueryYellowColorLatency defines the yellow color maximum // latency threshold for a single query QueryYellowColorLatency = 250 * time.Millisecond // ContextGreenColorLatency defines the green color maximum // latency threshold for a single context ContextGreenColorLatency = 250 * time.Millisecond // ContextYellowColorLatency defines the yellow color maximum // latency threshold for a single context ContextYellowColorLatency = 500 * time.Millisecond // QueriesGreenColorLatency defines the green color maximum // latency threshold for all the queries within a context QueriesGreenColorLatency = 100 * time.Millisecond // QueriesYellowColorLatency defines the yellow color maximum // latency threshold for all the queries within a context QueriesYellowColorLatency = 250 * time.Millisecond // QueriesGreenColorNumber defines the green color maximum // number threshold for queries within a context QueriesGreenColorNumber = 10 // QueriesYellowColorNumber defines the yellow color maximum // number threshold for queries within a context QueriesYellowColorNumber = 15 )
View Source
var ( // CacheCapacity describes the capacity of the context cache CacheCapacity int = 50 )
View Source
var ( // Mode describes the current mode Gilk is on Mode modeType = Enabled )
View Source
var ( // SkippedStackFrames describes the number of stack frames to // be skipped when the caller of the query context is captured SkippedStackFrames = 1 )
Functions ¶
func NewContext ¶
NewContext creates and caches a new Context of the executed scope
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.