Documentation ¶
Overview ¶
Package pprofextension implements an extension that exposes the golang net/http/pprof (Performance Profiler) in a HTTP endpoint.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶ added in v0.8.0
func NewFactory() component.ExtensionFactory
NewFactory creates a factory for pprof extension.
Types ¶
type Config ¶
type Config struct { config.ExtensionSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct // TCPAddr is the address and port in which the pprof will be listening to. // Use localhost:<port> to make it available only locally, or ":<port>" to // make it available on all network interfaces. TCPAddr confignet.TCPAddr `mapstructure:",squash"` // Fraction of blocking events that are profiled. A value <= 0 disables // profiling. See https://golang.org/pkg/runtime/#SetBlockProfileRate for details. BlockProfileFraction int `mapstructure:"block_profile_fraction"` // Fraction of mutex contention events that are profiled. A value <= 0 // disables profiling. See https://golang.org/pkg/runtime/#SetMutexProfileFraction // for details. MutexProfileFraction int `mapstructure:"mutex_profile_fraction"` // Optional file name to save the CPU profile to. The profiling starts when the // Collector starts and is saved to the file when the Collector is terminated. SaveToFile string `mapstructure:"save_to_file"` }
Config has the configuration for the extension enabling the golang net/http/pprof (Performance Profiler) extension.
Click to show internal directories.
Click to hide internal directories.