Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProfilingInProgress ¶
func ProfilingInProgress() bool
ProfilingInProgress returns true if we write profiles at the moment
func SetLogFunction ¶
func SetLogFunction(fxn LogFxn)
SetLogFunction changes function used for logging. Logging is very basic and doesn't have many levels, since all the messages has quite the same level
func StartProfiling ¶
StartProfiling starts writing profiles and returns path to the directory where they will be placed if anything goes wrong corresponding error is returned and no profiling is started If writing profiles is in progress it returns an error
func StopProfiling ¶
func StopProfiling() (profilesDirectory string)
StopProfiling stops writing all profiles. Before stopping it tries to write a heap dump to the same folder where the other profiles are kept. It returns path to the folder which contains profiling files If profiling is not in progress, this method does nothing and returns empty string
func ToggleProfiling ¶
ToggleProfiling changes state of writing profiles to the opposite