Skip to content

polarsignals/pprof-example-app-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pprof Example App Go

This example app serves as an example of how one can easily instrument HTTP handlers with Pprof profiles in Go. It uses the Go standard library.

It calculates fibonacci numbers starting at number 1 million to produce some CPU activity and allocates memory 1mb per second, it never frees this memory so be careful it may crash your system.

Run this example at your own risk Polar Signals is not responsible for damage this example may cause.

A Docker image is available at: quay.io/polarsignals/pprof-example-app-go:v0.1.0

Deploying in a Kubernetes cluster

First, deploy an instance of this example application, which listens and exposes metrics on port 8080 using the following Deployment manifest.

Then deploy the collector of the Polar Signals Continuous Profiler to continuously collect profiles from the example app.