debugserver

package
v0.51.4 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

README

runtime/pkg/debugserver

This package starts a HTTP server that serves net/http/pprof on port 6060.

Basic usage

Visit http://localhost:6060/debug/pprof/ for an overview of available functionality. Note that if you're running rill start, you must pass the --debug flag.

Advanced usage

Use the go tool pprof tool to sample/explore in more detail. See example invocations on https://pkg.go.dev/net/http/pprof.

Two useful flags to pass to go tool pprof are:

  • -seconds 10 to reduce the sampling duration
  • -http :9999 which hosts a UI for exploring the results on localhost:9999

Debugging a pod on Kubernetes

Setup port forwarding for the target pod:

kubectl port-forward -n NAMESPACE POD_NAME 6060:6060

Then you can explore profiling on localhost:6060 as if you were debugging locally.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeHTTP

func ServeHTTP(ctx context.Context, port int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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