Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moderato-app/live-pprof
Monitor Go app's performance in seconds, not a day.
https://github.com/moderato-app/live-pprof
development go grafana local monitor perfomance pprof prometheus
Last synced: 4 days ago
JSON representation
Monitor Go app's performance in seconds, not a day.
- Host: GitHub
- URL: https://github.com/moderato-app/live-pprof
- Owner: moderato-app
- Created: 2024-08-12T22:14:57.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-19T11:55:52.000Z (24 days ago)
- Last Synced: 2025-01-01T09:02:56.732Z (11 days ago)
- Topics: development, go, grafana, local, monitor, perfomance, pprof, prometheus
- Language: TypeScript
- Homepage:
- Size: 5.2 MB
- Stars: 290
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
You don’t want to clutter up your computer with Docker, Prometheus, Grafana or even K8S just to monitor a Go app's heap size, right?
Use `live-pprof` to Monitor a Go app's performance. It launches in seconds, boosting your local development.
[![go-recipes](https://raw.githubusercontent.com/nikolaydubina/go-recipes/main/badge.svg?raw=true)](https://github.com/nikolaydubina/go-recipes)
https://github.com/user-attachments/assets/77bfacd8-1779-4aaf-9758-9604362a1eb5
Screenshots
## Install
```bash
go install github.com/moderato-app/live-pprof@v1
```## Usage
#### Step 1: setup pprof endpoints
```bash
package mainimport (
"log"
"net/http"
_ "net/http/pprof"
)func main() {
log.Println(http.ListenAndServe("localhost:6060", nil))
}
```#### Step 2: monitor the pprof endpoints
```bash
live-pprof 6060
# Or:
live-pprof http://localhost:6060/debug/pprof
# Both commands will monitor http://localhost:6060/debug/pprof
```## Limitations
* Metrics data is stored in the browser memory and is cleared on page refresh.
* The page slows down as data grows due to charts rendering.As you can see, live-pprof is mainly for local development. These limitations mean it’s not a replacement for Prometheus and Grafana.
Thanks to [Golang Weekly](https://golangweekly.com/latest) for the shoutout!