e2eprof

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithParcaImage

func WithParcaImage(image string) func(*opt)

WithParcaImage allows injecting custom Parca docker image to use as scraper and queryable.

func WithScrapeInterval

func WithScrapeInterval(interval time.Duration) func(*opt)

WithScrapeInterval changes how often profiles are collected by Parca. 5s by default.

Types

type Option

type Option func(*opt)

type Parca

type Parca struct {
	e2e.Runnable
	e2emon.Instrumented
	// contains filtered or unexported fields
}

func NewParca

func NewParca(env e2e.Environment, name string, image string, flagOverride map[string]string) *Parca

func (*Parca) SetScrapeConfigs

func (p *Parca) SetScrapeConfigs(scrapeJobs []parcaconfig.ScrapeConfig) error

SetScrapeConfigs updates Parca with new configuration.

type Profiled

type Profiled interface {
	ProfileTargets() []Target
}

type ProfiledOption

type ProfiledOption func(*rOpt)

func WithProfiledConfig

func WithProfiledConfig(config parcaconfig.ProfilingConfig) ProfiledOption

WithProfiledConfig sets a custom parca ProfilingConfig entry about this runnable. Empty by default (Parca defaults apply).

func WithProfiledScheme

func WithProfiledScheme(scheme string) ProfiledOption

WithProfiledScheme allows adding customized scheme. "http" or "https" values allowed. "http" by default. If "https" is specified, insecure TLS will be performed.

type ProfiledRunnable

type ProfiledRunnable struct {
	e2e.Runnable
	// contains filtered or unexported fields
}

ProfiledRunnable represents runnable with pprof HTTP handlers exposed.

func AsProfiled

func AsProfiled(r e2e.Runnable, pprofPortName string, opts ...ProfiledOption) *ProfiledRunnable

AsProfiled wraps e2e.Runnable with ProfiledRunnable. If runnable is running during invocation AsProfiled panics. NOTE(bwplotka): Caller is expected to discard passed `r` runnable and use returned ProfiledRunnable.Runnable instead.

func (*ProfiledRunnable) ProfileTargets

func (r *ProfiledRunnable) ProfileTargets() []Target

type Service

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

func Start

func Start(env e2e.Environment, opts ...Option) (_ *Service, err error)

Start deploys monitoring service which deploys Parca that collects profiles from all ProfiledRunnable instances in environment created with AsProfiled.

func (*Service) OpenUserInterfaceInBrowser

func (s *Service) OpenUserInterfaceInBrowser(paths ...string) error

type Target

type Target struct {
	Name             string // Represents runnable job and will be used for scrape job name.
	InternalEndpoint string
	Scheme           string // "http" by default.
	Config           *parcaconfig.ProfilingConfig
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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