Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sevennt/echo-pprof
echo-pprof is a wrapper for golang web framework echo to use net/http/pprof easily.
https://github.com/sevennt/echo-pprof
echo golang pprof profile profiling
Last synced: 3 months ago
JSON representation
echo-pprof is a wrapper for golang web framework echo to use net/http/pprof easily.
- Host: GitHub
- URL: https://github.com/sevennt/echo-pprof
- Owner: sevennt
- License: mit
- Created: 2017-04-26T06:29:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-11-15T16:54:36.000Z (12 months ago)
- Last Synced: 2024-06-19T14:14:33.678Z (5 months ago)
- Topics: echo, golang, pprof, profile, profiling
- Language: Go
- Homepage:
- Size: 18.6 KB
- Stars: 79
- Watchers: 6
- Forks: 56
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-profiling - echo-pprof - A wrapper for golang web framework echo to use `net/http/pprof` easily. (3. Application / Golang)
README
echo-pprof
========A wrapper for [Echo web framework](https://github.com/labstack/echo) to use `net/http/pprof` easily.
## Install
```sh
go get -u github.com/sevenNt/echo-pprof
```## Usage
```go
package mainimport (
"github.com/labstack/echo/v4"
"github.com/sevenNt/echo-pprof"
)func main() {
e := echo.New()e.GET("/ping", func(c echo.Context) error {
return c.String(200, "pong")
})// automatically add routers for net/http/pprof
// e.g. /debug/pprof, /debug/pprof/heap, etc.
echopprof.Wrap(e)// echopprof also plays well with *echo.Group
// prefix := "/debug/pprof"
// group := e.Group(prefix)
// echopprof.WrapGroup(prefix, group)e.Start(":8080")
}
```Start this server, and then visit [http://127.0.0.1:8080/debug/pprof/](http://127.0.0.1:8080/debug/pprof/), and you'll see the pprof index page.
Have fun.