pprof

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 8 Imported by: 0

README

pprof

使用方式

获取
go get github.com/928799934/go-pprof
使用
package main

import (
	"fmt"
	"github.com/928799934/go-pprof"
	"net/http"
)

func main() {
	_ = pprof.InitByString([]string{":81"})
	defer pprof.Close()
	http.HandleFunc("/ccc", func(wr http.ResponseWriter, r *http.Request) {
		fmt.Fprintln(wr, "ok")
	})
	http.ListenAndServe(":8080", nil)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close close the resource.

func InitByListener

func InitByListener(socketList []net.Listener) error

InitByListener ...

func InitByString

func InitByString(addrList []string) error

InitByString StartPprof start http pprof.

func SetErrorLog

func SetErrorLog(l *log.Logger)

SetErrorLog 设置输出

Types

This section is empty.

Jump to

Keyboard shortcuts

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