go-pprof-schedule

command module
v0.0.0-...-4ce144d Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: MIT Imports: 6 Imported by: 0

README

Go Pprof Schedule

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.

Prerequisites

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.

Steps to Run the Application

1. Clone the Repository
git clone https://github.com/rafaehl/go-pprof-schedule.git
cd go-pprof-schedule
2. Run the Web Application
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.

3. Run the Command-line Application (CMD)
go run cmd/profiler/main.go --cpuprofile cpu.prof --appurl http://external-app-url:port

This will run the application in command-line mode.

4. Run the Application using Docker
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.

Configuration

  • --cpuprofile: Specify the filename to save the CPU profile (optional).
  • --appurl: Specify the URL of the external application with profiling enabled (optional).

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

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