pprof

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 5 Imported by: 0

README

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)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() func(*fiber.Ctx)

New pprofhandler

Types

This section is empty.

Jump to

Keyboard shortcuts

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