Documentation ¶
Index ¶
- Constants
- func AppSegmentKey(appName string) string
- func FromTreeToDictKey(k string) string
- func ParseTreeKey(k string) (time.Time, int, error)
- func TreeKey(k string, depth int, unixTime int64) string
- func ValidateKey(k *Key) error
- type Addon
- type Key
- func (k *Key) Add(key, value string)
- func (k *Key) AppName() string
- func (k *Key) Clone() *Key
- func (k *Key) DictKey() string
- func (k *Key) HasProfileID() bool
- func (k *Key) Labels() map[string]string
- func (k *Key) Match(q *flameql.Query) bool
- func (k *Key) Normalized() string
- func (k *Key) ProfileID() (string, bool)
- func (k *Key) SegmentKey() string
- func (k *Key) TreeKey(depth int, t time.Time) string
- type ParserState
- type RetentionPolicy
- func (r RetentionPolicy) LowerTimeBoundary() time.Time
- func (r *RetentionPolicy) SetAbsolutePeriod(period time.Duration) *RetentionPolicy
- func (r *RetentionPolicy) SetExemplarsRetentionPeriod(period time.Duration) *RetentionPolicy
- func (r *RetentionPolicy) SetLevelPeriod(level int, period time.Duration) *RetentionPolicy
- func (r *RetentionPolicy) SetLevels(levels ...time.Duration) *RetentionPolicy
- type Segment
- func (s *Segment) Bytes() ([]byte, error)
- func (s *Segment) DeleteNodesBefore(t *RetentionPolicy) (bool, error)
- func (s *Segment) Get(st, et time.Time, ...)
- func (s *Segment) GetContext(ctx context.Context, st, et time.Time, ...)
- func (s *Segment) GetMetadata() metadata.Metadata
- func (s *Segment) Put(st, et time.Time, samples uint64, ...) error
- func (s *Segment) Serialize(w io.Writer) error
- func (s *Segment) SetMetadata(md metadata.Metadata)
- func (s *Segment) StartTime() time.Time
- func (s *Segment) Visualize()
- func (s *Segment) WalkNodesToDelete(t *RetentionPolicy, cb func(depth int, t time.Time) error) (bool, error)
- type Timeline
- type TmpltVars
Constants ¶
View Source
const ProfileIDLabelName = "profile_id"
Variables ¶
This section is empty.
Functions ¶
func AppSegmentKey ¶
func FromTreeToDictKey ¶
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 ¶
ParseTreeKey retrieves tree time and depth level from the given key.
func ValidateKey ¶
Types ¶
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
func (*Key) HasProfileID ¶
func (*Key) Normalized ¶
func (*Key) SegmentKey ¶
type ParserState ¶
type ParserState int
type RetentionPolicy ¶
type RetentionPolicy struct { AbsoluteTime time.Time Levels map[int]time.Time ExemplarsRetentionTime time.Time // contains filtered or unexported fields }
func NewRetentionPolicy ¶
func NewRetentionPolicy() *RetentionPolicy
func (RetentionPolicy) LowerTimeBoundary ¶
func (r RetentionPolicy) LowerTimeBoundary() time.Time
func (*RetentionPolicy) SetAbsolutePeriod ¶
func (r *RetentionPolicy) SetAbsolutePeriod(period time.Duration) *RetentionPolicy
func (*RetentionPolicy) SetExemplarsRetentionPeriod ¶
func (r *RetentionPolicy) SetExemplarsRetentionPeriod(period time.Duration) *RetentionPolicy
func (*RetentionPolicy) SetLevelPeriod ¶
func (r *RetentionPolicy) SetLevelPeriod(level int, period time.Duration) *RetentionPolicy
func (*RetentionPolicy) SetLevels ¶
func (r *RetentionPolicy) SetLevels(levels ...time.Duration) *RetentionPolicy
type Segment ¶
type Segment struct {
// contains filtered or unexported fields
}
func (*Segment) DeleteNodesBefore ¶
func (s *Segment) DeleteNodesBefore(t *RetentionPolicy) (bool, error)
func (*Segment) GetContext ¶
func (*Segment) GetMetadata ¶
func (*Segment) Put ¶
func (s *Segment) Put(st, et time.Time, samples uint64, cb func(depth int, t time.Time, r *big.Rat, addons []Addon)) error
TODO: simplify arguments TODO: validate st < et
func (*Segment) SetMetadata ¶
func (*Segment) WalkNodesToDelete ¶
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 }
func GenerateTimeline ¶
func (*Timeline) PopulateTimeline ¶
Click to show internal directories.
Click to hide internal directories.