segment

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ProfileIDLabelName = "profile_id"

Variables

This section is empty.

Functions

func AppSegmentKey

func AppSegmentKey(appName string) string

func FromTreeToDictKey

func FromTreeToDictKey(k string) string

FromTreeToDictKey returns app name from tree key k: given tree key "foo{}:0:1234567890", the call returns "foo".

Before tags support, segment key form (i.e. app name + tags: foo{key=value}) has been used to reference a dictionary (trie).

func ParseTreeKey

func ParseTreeKey(k string) (time.Time, int, error)

ParseTreeKey retrieves tree time and depth level from the given key.

func TreeKey

func TreeKey(k string, depth int, unixTime int64) string

func ValidateKey

func ValidateKey(k *Key) error

Types

type Key

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

func NewKey

func NewKey(labels map[string]string) *Key

func ParseKey

func ParseKey(name string) (*Key, error)

func (*Key) Add

func (k *Key) Add(key, value string)

func (*Key) AppName

func (k *Key) AppName() string

func (*Key) Clone

func (k *Key) Clone() *Key

func (*Key) DictKey

func (k *Key) DictKey() string

func (*Key) HasProfileID

func (k *Key) HasProfileID() bool

func (*Key) Labels

func (k *Key) Labels() map[string]string

func (*Key) Match

func (k *Key) Match(q *flameql.Query) bool

Match reports whether the key matches the query.

func (*Key) Normalized

func (k *Key) Normalized() string

func (*Key) ProfileID

func (k *Key) ProfileID() (string, bool)

func (*Key) SegmentKey

func (k *Key) SegmentKey() string

func (*Key) TreeKey

func (k *Key) TreeKey(depth int, t time.Time) string

type ParserState

type ParserState int

type Timeline

type Timeline struct {
	StartTime int64    `json:"startTime"`
	Samples   []uint64 `json:"samples"`

	DurationDeltaNormalized int64 `json:"durationDelta"`

	// Watermarks map contains down-sampling watermarks (Unix timestamps)
	// describing resolution levels of the timeline.
	//
	// Resolution in seconds is calculated as 10^k, where k is the map key.
	// Meaning that any range within these 10^k seconds contains not more
	// than one sample. Any sub-range less than 10^k shows down-sampled data.
	//
	// Given the map:
	//  1: 1635508310
	//  2: 1635507500
	//  3: 1635506200
	//
	// This should be read as follows:
	//  1. Data after 1635508310 is as precise as possible (10s resolution),
	//     down-sampling was not applied.
	//  2. Data before 1635508310 has resolution 100s
	//  3. Data before 1635507500 has resolution 1000s
	//  4. Data before 1635506200 has resolution 10000s
	Watermarks map[int]int64 `json:"watermarks"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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