This is a profiling application that allows you to schedule and collect profiling data both locally and from an external application via HTTP. It also includes a web interface to visualize the results.
Make sure you have Go (1.20 or above) installed on your system. You will also need Docker if you want to run the application as a Docker image.
git clone https://github.com/rafaehl/go-pprof-schedule.git
cd go-pprof-schedule
go run cmd/profiler/main.go --cpuprofile cpu.prof --appurl http://external-app-url:port
Access http://localhost:8080
in your browser to view the profiling web interface.
go run cmd/profiler/main.go --cpuprofile cpu.prof --appurl http://external-app-url:port
This will run the application in command-line mode.
docker build -t go-pprof-schedule .
docker run -p 8080:8080 go-pprof-schedule
This will create a Docker image and run the application inside a container.
--cpuprofile
: Specify the filename to save the CPU profile (optional).--appurl
: Specify the URL of the external application with profiling enabled (optional).
This project is licensed under the MIT License. See the LICENSE file for more details.