Skip to content

Profiling

Illarion Kovalchuk edited this page Apr 10, 2019 · 1 revision

Profiling

(since 0.7.0)

Gobetween has embedded profiler support that can be enabled it in config:

#
# Pprof profiler configuration
#
[profiler]
enabled = true  # false | true
bind = ":6060"  # "host:port"

Development / hacking

If you want to use it while develping/hacking gobetween please refer to

Reporting issues

Profiler can be used in order to help report performance issues, strange gobetween behavior and so on. All following examples assume that profiler is enabled and commands are executed on the gobetween host.

Collect cpu profile

wget http://localhost:6060/debug/pprof/profile?seconds=30 -O cpuprofile.pprof

Collect memory profile

wget http://localhost:6060/debug/pprof/heap -O heap.pprof

Collect goroutines state

wget http://localhost:6060/debug/pprof/goroutine?debug=1 -O goroutines.txt

Attaching this files to a ticket will help us to investigate the issue.