benchmarks/

directory
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2023 License: MIT

README

Gluon Benchmarks

Collection of benchmarks and/or tools to test and/or profile Gluon performance. See each folder's README.md for more information.

Capturing Profiles

You can use the gluon demo binary as a way to profile Gluon. Be sure to build the binary with go build.

You need to run the benchmark for each type of profile you wish to generate as it is not possible to profile multiple items at the same time.

Example:

./demo -profile-cpu -profile-path=$PWD # Generates $PWD/cpu.pprof - CPU Profiling.
./demo -profile-mem -profile-path=$PWD # Generates $PWD/mem.pprof - Memory Profiling.
./demo -profile-lock -profile-path=$PWD # Generates $PWD/block.pprof - Locking/blocking profiling.

When the benchmark has finished execution kill the demo binary and the profile data will be written out.

Analysing the data

You need to install the pprof tool (go install github.com/google/pprof) to analyse the generated data.

After the tool is installed you can analyse the data with pprof <path to .pprof file>. See this blog post and this tutorial for an introduction to pprof.

For a more comprehensible overview you can also launch pprof's web interface which includes many additions such as a flamegraph.

pprof -http 127.0.0.1:8080 <path to .pprof file>

Available Benchmarks/Tools

References

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL