server

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollapsedToProfileV1 added in v0.9.0

func CollapsedToProfileV1(b []byte, name string, maxNodes int) (*flamebearer.FlamebearerProfile, error)

func ConverterToFormat added in v0.10.0

func ConverterToFormat(f ConverterFn) string

func DiffV1 added in v0.10.0

func DiffV1(name string, base, diff *flamebearer.FlamebearerProfile, maxNodes int) (flamebearer.FlamebearerProfile, error)

DiffV1 takes two single V1 profiles and generates a diff V1 profile

func JSONToProfileV1 added in v0.9.0

func JSONToProfileV1(b []byte, _ string, _ int) (*flamebearer.FlamebearerProfile, error)

func PprofToProfileV1 added in v0.9.0

func PprofToProfileV1(b []byte, name string, maxNodes int) (*flamebearer.FlamebearerProfile, error)

Types

type ConverterFn added in v0.8.0

type ConverterFn func(b []byte, name string, maxNodes int) (*flamebearer.FlamebearerProfile, error)

type Model added in v0.10.0

type Model struct {
	// Name of the file in which the profile was saved, if any.
	Filename string `json:"filename"`
	// base64-encoded data of the profile, in any of the supported formats
	// (currently supported: pprof, Pyroscope JSON and collapsed).
	Profile []byte `json:"profile"`
	// Type of profile, if known (currently supported: pprof, json, collapsed")
	Type string `json:"type"`
}

swagger:model

func (Model) Converter added in v0.10.0

func (m Model) Converter() (ConverterFn, error)

type Server

type Server interface {
	AddRoutes(router *mux.Router) http.HandlerFunc
}

func New

func New(log logrus.FieldLogger, dataDir string, maxNodes int, enabled bool) Server

Jump to

Keyboard shortcuts

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