parcacol

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const (
	SchemaName = "parca"
	// The columns are sorted by their name in the schema too.
	ColumnDuration       = "duration"
	ColumnLabels         = "labels"
	ColumnName           = "name"
	ColumnPeriod         = "period"
	ColumnPeriodType     = "period_type"
	ColumnPeriodUnit     = "period_unit"
	ColumnPprofLabels    = "pprof_labels"
	ColumnPprofNumLabels = "pprof_num_labels"
	ColumnSampleType     = "sample_type"
	ColumnSampleUnit     = "sample_unit"
	ColumnStacktrace     = "stacktrace"
	ColumnTimestamp      = "timestamp"
	ColumnValue          = "value"
)

Variables

View Source
var ErrMissingNameLabel = errors.New("missing __name__ label")

Functions

func ArrowRecordToStacktraceSamples

func ArrowRecordToStacktraceSamples(
	ctx context.Context,
	metaStore metastore.ProfileMetaStore,
	ar arrow.Record,
	valueColumnName string,
) (*profile.StacktraceSamples, error)

func FlatProfileToBuffer

func FlatProfileToBuffer(logger log.Logger, inLs labels.Labels, schema *dynparquet.Schema, prof *parcaprofile.Profile) (*dynparquet.Buffer, error)

func InsertProfileIntoTable

func InsertProfileIntoTable(ctx context.Context, logger log.Logger, table Table, ls labels.Labels, prof *parcaprofile.Profile) (int, error)

func Schema

func Schema() *dynparquet.Schema

Types

type Sample

type Sample struct {
	Duration       int64
	Labels         labels.Labels
	Name           string
	Period         int64
	PeriodType     string
	PeriodUnit     string
	PprofLabels    map[string]string
	PprofNumLabels map[string]int64
	SampleType     string
	SampleUnit     string
	Stacktrace     []byte
	Timestamp      int64
	Value          int64
}

Sample is a decomposed pprof Sample that will be appended to columnar storage. All fields are columns that are sorted by their name in the schema too.

func (Sample) ToParquetRow

func (s Sample) ToParquetRow(schema *dynparquet.Schema, row parquet.Row, labelNames, pprofLabelNames, pprofNumLabelNames []string) parquet.Row

type Samples

type Samples []Sample

func (Samples) SampleLabelNames

func (s Samples) SampleLabelNames() []string

func (Samples) ToBuffer

func (s Samples) ToBuffer(schema *dynparquet.Schema) (*dynparquet.Buffer, error)

type Table

type Table interface {
	Schema() *dynparquet.Schema
	InsertBuffer(buf *dynparquet.Buffer) (tx uint64, err error)
}

Jump to

Keyboard shortcuts

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