storage

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteInput added in v0.0.33

type DeleteInput struct {
	Key *segment.Key
}

type GetInput added in v0.0.30

type GetInput struct {
	StartTime time.Time
	EndTime   time.Time
	Key       *segment.Key
	Query     *flameql.Query
}

type GetOutput added in v0.0.30

type GetOutput struct {
	Tree       *tree.Tree
	Timeline   *segment.Timeline
	SpyName    string
	SampleRate uint32
	Units      string
}

type MetricsExporter added in v0.2.1

type MetricsExporter interface {
	// Evaluate evaluates metrics export rules against the input key and creates
	// prometheus counters for new time series, if required. Returned observer can
	// be used to evaluate and observe particular samples.
	//
	// If there are no matching rules, the function returns false.
	Evaluate(*PutInput) (SampleObserver, bool)
}

MetricsExporter exports values of particular stack traces sample from profiling data as a Prometheus metrics.

type PutInput added in v0.0.30

type PutInput struct {
	StartTime       time.Time
	EndTime         time.Time
	Key             *segment.Key
	Val             *tree.Tree
	SpyName         string
	SampleRate      uint32
	Units           string
	AggregationType string
}

type SampleObserver added in v0.2.1

type SampleObserver interface {
	// Observe adds v to the matched counters if k satisfies node selector.
	// k is a sample stack trace where frames are delimited by semicolon.
	// v is the sample value.
	Observe(k []byte, v int)
}

type Storage

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

func New

func (*Storage) CacheStats added in v0.0.33

func (s *Storage) CacheStats() map[string]interface{}

func (*Storage) Close

func (s *Storage) Close() error

func (*Storage) CollectLocalProfiles added in v0.0.33

func (s *Storage) CollectLocalProfiles() error

func (*Storage) Delete added in v0.0.33

func (s *Storage) Delete(di *DeleteInput) error

func (*Storage) DeleteDataBefore added in v0.0.33

func (s *Storage) DeleteDataBefore(threshold time.Time) error

func (*Storage) DiskUsage

func (s *Storage) DiskUsage() map[string]bytesize.ByteSize

func (*Storage) Get

func (s *Storage) Get(gi *GetInput) (*GetOutput, error)

func (*Storage) GetKeys

func (s *Storage) GetKeys(cb func(_k string) bool)

func (*Storage) GetKeysByQuery added in v0.0.38

func (s *Storage) GetKeysByQuery(query string, cb func(_k string) bool) error

func (*Storage) GetValues

func (s *Storage) GetValues(key string, cb func(v string) bool)

func (*Storage) GetValuesByQuery added in v0.0.38

func (s *Storage) GetValuesByQuery(label string, query string, cb func(v string) bool) error

func (*Storage) InstallID

func (s *Storage) InstallID() string

func (*Storage) JWT added in v0.0.38

func (s *Storage) JWT() (string, error)

func (*Storage) Put

func (s *Storage) Put(pi *PutInput) error

func (*Storage) PutLocal added in v0.0.33

func (s *Storage) PutLocal(po *PutInput) error

Directories

Path Synopsis
lfu

Jump to

Keyboard shortcuts

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