pprof

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2025 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(logger zerolog.Logger) tools.Tool

Types

type Input

type Input struct {
	Host     string `json:"host,omitempty"`
	Port     int    `json:"port,omitempty"`
	Profile  string `json:"profile,omitempty"`
	Seconds  int    `json:"seconds,omitempty"`
	MaxLines int    `json:"max_lines,omitempty"` // Maximum lines to return (default: 100 for top view)
	Offset   int    `json:"offset,omitempty"`    // Line offset for pagination
}

type Output

type Output struct {
	URL         string `json:"url"`
	Status      int    `json:"status"`
	ContentType string `json:"content_type"`
	Size        int    `json:"size"`
	Content     string `json:"content"`
	TotalLines  int    `json:"total_lines"`
	Offset      int    `json:"offset"`
	MaxLines    int    `json:"max_lines"`
	Truncated   bool   `json:"truncated"`
}

type Tool

type Tool struct {
	// contains filtered or unexported fields
}

func (*Tool) PprofHandler

func (p *Tool) PprofHandler(context context.Context, _ *mcp.ServerSession, params *mcp.CallToolParamsFor[Input]) (*mcp.CallToolResultFor[Output], error)

func (*Tool) Register

func (p *Tool) Register(srv *server.Server)

Jump to

Keyboard shortcuts

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