v1

package
v0.1.2-rc3 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FunctionPersister

type FunctionPersister struct{}

func (*FunctionPersister) Deconstruct

func (*FunctionPersister) Deconstruct(row parquet.Row, id uint64, l *profilev1.Function) parquet.Row

func (*FunctionPersister) Name

func (*FunctionPersister) Name() string

func (*FunctionPersister) Reconstruct

func (*FunctionPersister) Reconstruct(row parquet.Row) (id uint64, l *profilev1.Function, err error)

func (*FunctionPersister) Schema

func (*FunctionPersister) Schema() *parquet.Schema

func (*FunctionPersister) SortingColumns

func (*FunctionPersister) SortingColumns() parquet.SortingOption

type LocationPersister

type LocationPersister struct{}

func (*LocationPersister) Deconstruct

func (*LocationPersister) Deconstruct(row parquet.Row, id uint64, l *profilev1.Location) parquet.Row

func (*LocationPersister) Name

func (*LocationPersister) Name() string

func (*LocationPersister) Reconstruct

func (*LocationPersister) Reconstruct(row parquet.Row) (id uint64, l *profilev1.Location, err error)

func (*LocationPersister) Schema

func (*LocationPersister) Schema() *parquet.Schema

func (*LocationPersister) SortingColumns

func (*LocationPersister) SortingColumns() parquet.SortingOption

type MappingPersister

type MappingPersister struct{}

func (*MappingPersister) Deconstruct

func (*MappingPersister) Deconstruct(row parquet.Row, id uint64, m *profilev1.Mapping) parquet.Row

func (*MappingPersister) Name

func (*MappingPersister) Name() string

func (*MappingPersister) Reconstruct

func (*MappingPersister) Reconstruct(row parquet.Row) (id uint64, m *profilev1.Mapping, err error)

func (*MappingPersister) Schema

func (*MappingPersister) Schema() *parquet.Schema

func (*MappingPersister) SortingColumns

func (*MappingPersister) SortingColumns() parquet.SortingOption

type Persister

type Persister[T any] interface {
	PersisterName
	Schema() *parquet.Schema
	Deconstruct(parquet.Row, uint64, T) parquet.Row
	Reconstruct(parquet.Row) (uint64, T, error)
	SortingColumns() parquet.SortingOption
}

type PersisterName

type PersisterName interface {
	Name() string
}

type Profile

type Profile struct {
	// A unique UUID per ingested profile
	ID uuid.UUID `parquet:",uuid"`

	// SeriesIndex references the underlying series and is generated when
	// writing the TSDB index. The SeriesIndex is different from block to
	// block.
	SeriesIndex uint32 `parquet:",delta"`

	// SeriesFingerprint references the underlying series and is purely based
	// on the label values. The value is consistent for the same label set (so
	// also between different blocks).
	SeriesFingerprint model.Fingerprint `parquet:"-"`

	// The set of samples recorded in this profile.
	Samples []*Sample `parquet:",list"`

	// frames with Function.function_name fully matching the following
	// regexp will be dropped from the samples, along with their successors.
	DropFrames int64 `parquet:",optional"` // Index into string table.
	// frames with Function.function_name fully matching the following
	// regexp will be kept, even if it matches drop_frames.
	KeepFrames int64 `parquet:",optional"` // Index into string table.
	// Time of collection (UTC) represented as nanoseconds past the epoch.
	TimeNanos int64 `parquet:",delta,timestamp(nanosecond)"`
	// Duration of the profile, if a duration makes sense.
	DurationNanos int64 `parquet:",delta,optional"`
	// The number of events between sampled occurrences.
	Period int64 `parquet:",optional"`
	// Freeform text associated to the profile.
	Comments []int64 `parquet:",list"` // Indices into string table.
	// Index into the string table of the type of the preferred sample
	// value. If unset, clients should default to the last sample value.
	DefaultSampleType int64 `parquet:",optional"`
}

func (Profile) Timestamp

func (p Profile) Timestamp() model.Time

func (Profile) Total

func (p Profile) Total() int64

type ProfilePersister

type ProfilePersister struct{}

func (*ProfilePersister) Deconstruct

func (*ProfilePersister) Deconstruct(row parquet.Row, id uint64, s *Profile) parquet.Row

func (*ProfilePersister) Name

func (*ProfilePersister) Name() string

func (*ProfilePersister) Reconstruct

func (*ProfilePersister) Reconstruct(row parquet.Row) (id uint64, s *Profile, err error)

func (*ProfilePersister) Schema

func (*ProfilePersister) Schema() *parquet.Schema

func (*ProfilePersister) SortingColumns

func (*ProfilePersister) SortingColumns() parquet.SortingOption

type ReadWriter

type ReadWriter[T any, P Persister[T]] struct{}

func (*ReadWriter[T, P]) ReadParquetFile

func (*ReadWriter[T, P]) ReadParquetFile(file io.ReaderAt) ([]T, error)

func (*ReadWriter[T, P]) WriteParquetFile

func (*ReadWriter[T, P]) WriteParquetFile(file io.Writer, elements []T) error

type Sample

type Sample struct {
	StacktraceID uint64             `parquet:",delta"`
	Value        int64              `parquet:",delta"`
	Labels       []*profilev1.Label `parquet:",list"`
}

type Stacktrace

type Stacktrace struct {
	LocationIDs []uint64 `parquet:",list"`
}

type StacktracePersister

type StacktracePersister struct{}

func (*StacktracePersister) Deconstruct

func (*StacktracePersister) Deconstruct(row parquet.Row, id uint64, s *Stacktrace) parquet.Row

func (*StacktracePersister) Name

func (*StacktracePersister) Name() string

func (*StacktracePersister) Reconstruct

func (*StacktracePersister) Reconstruct(row parquet.Row) (id uint64, s *Stacktrace, err error)

func (*StacktracePersister) Schema

func (*StacktracePersister) Schema() *parquet.Schema

func (*StacktracePersister) SortingColumns

func (*StacktracePersister) SortingColumns() parquet.SortingOption

type StoredString

type StoredString struct {
	ID     uint64 `parquet:",delta"`
	String string `parquet:",dict"`
}

type StringPersister

type StringPersister struct{}

func (*StringPersister) Deconstruct

func (*StringPersister) Deconstruct(row parquet.Row, id uint64, s string) parquet.Row

func (*StringPersister) Name

func (*StringPersister) Name() string

func (*StringPersister) Reconstruct

func (*StringPersister) Reconstruct(row parquet.Row) (id uint64, s string, err error)

func (*StringPersister) Schema

func (*StringPersister) Schema() *parquet.Schema

func (*StringPersister) SortingColumns

func (*StringPersister) SortingColumns() parquet.SortingOption

Jump to

Keyboard shortcuts

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