Fenny / pprof

🧬 pprof middleware for Fiber

Home Page:https://github.com/gofiber/fiber

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PPROF

Release Discord Test Security Linter

Special thanks to Matthew Lee (@mthli)

Install

go get -u github.com/gofiber/fiber
go get -u github.com/gofiber/pprof

Example

package main

import (
  "github.com/gofiber/fiber"
  "github.com/gofiber/pprof"
  // pprofh "github.com/gofiber/pprof"
)

func main() {
  app := fiber.New()
  
  app.Use(pprof.New())
  // http://localhost:3000/debug/pprof/
  // http://localhost:3000/debug/pprof/cmdline
  // http://localhost:3000/debug/pprof/profile?seconds=30
  // http://localhost:3000/debug/pprof/symbol
  // http://localhost:3000/debug/pprof/trace?seconds=5
  // http://localhost:3000/debug/pprof/allocs
  // http://localhost:3000/debug/pprof/block
  // http://localhost:3000/debug/pprof/goroutine
  // http://localhost:3000/debug/pprof/heap
  // http://localhost:3000/debug/pprof/mutex
  // http://localhost:3000/debug/pprof/threadcreate

  app.Get("/", func(c *fiber.Ctx) {
    c.Send("Hello, World!")
  })
  
  app.Listen(3000)
}

About

🧬 pprof middleware for Fiber

https://github.com/gofiber/fiber

License:MIT License


Languages

Language:Go 100.0%