gozeropprof

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: MIT Imports: 6 Imported by: 0

README

github.com/randolphcyg/gozeropprof

gozeropprof is a tool used to integrate pprof into go-zero and analyze the running performance of go-zero projects.

1. Install

go get "github.com/randolphcyg/gozeropprof"

2. Usage

Register pprof agent at the gozero project entry method:

package main

import "github.com/RandolphCYG/gozeropprof"

func main() {
    // ...
    gozeropprof.StartAgent("0.0.0.0", 6060)
	// ...
}

3. Visualization

  • Make sure to install the Graphviz tool first
  • Execute the following command on the server where the service is located, and the pprof analysis results will be presented at the address http://127.0.0.1:1357
go tool pprof -http=:1357 http://127.0.0.1:6060/debug/pprof/goroutine

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartAgent

func StartAgent(host string, port int32)

StartAgent starts a pprof agent.

Types

This section is empty.

Jump to

Keyboard shortcuts

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