pprof

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: BSD-3-Clause Imports: 15 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" validate:"omitempty,hostname|ip"`
	Port     int    `json:"port,omitempty" validate:"min=0,max=65535"`
	Profile  string `json:"profile,omitempty" validate:"omitempty,alphanum|contains=/,max=255"`
	Seconds  int    `json:"seconds,omitempty" validate:"min=0,max=3600"`
	MaxLines int    `json:"max_lines,omitempty" validate:"min=0,max=100000"` // Maximum lines to return (default: 100 for top view)
	Offset   int    `json:"offset,omitempty" validate:"min=0"`               // 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(ctx context.Context, _ *mcp.CallToolRequest, input Input) (*mcp.CallToolResult, 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