parcacol

package
v0.12.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 14 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,
	m pb.MetastoreServiceClient,
	ar arrow.Record,
	valueColumnName string,
	meta profile.Meta,
) (*profile.Profile, error)

func NormalizedProfileToParquetBuffer added in v0.12.0

func NormalizedProfileToParquetBuffer(schema *dynparquet.Schema, ls labels.Labels, p *profile.NormalizedProfile) (*dynparquet.Buffer, error)

NormalizedProfileToParquetBuffer converts a normalized profile to a Parquet buffer. The passed labels must be sorted.

func SampleToParquetRow added in v0.12.0

func SampleToParquetRow(
	schema *dynparquet.Schema,
	row parquet.Row,
	profileLabelNames, profileNumLabelNames []string,
	ls labels.Labels,
	meta profile.Meta,
	s *profile.NormalizedSample,
) parquet.Row

SampleToParquetRow converts a sample to a Parquet row. The passed labels must be sorted.

func Schema

func Schema() *dynparquet.Schema

func SymbolizeNormalizedProfile added in v0.12.0

func SymbolizeNormalizedProfile(ctx context.Context, m pb.MetastoreServiceClient, p *profile.NormalizedProfile) (*profile.Profile, error)

Types

type Ingester added in v0.12.0

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

func NewIngester added in v0.12.0

func NewIngester(logger log.Logger, normalizer *Normalizer, table Table) *Ingester

func (Ingester) Ingest added in v0.12.0

func (ing Ingester) Ingest(ctx context.Context, ls labels.Labels, p *pprofproto.Profile, normalized bool) error

func (Ingester) IngestProfile added in v0.12.0

func (ing Ingester) IngestProfile(ctx context.Context, ls labels.Labels, p *profile.NormalizedProfile) error

type Normalizer added in v0.12.0

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

func NewNormalizer added in v0.12.0

func NewNormalizer(metastore pb.MetastoreServiceClient) *Normalizer

func (*Normalizer) NormalizeFunctions added in v0.12.0

func (n *Normalizer) NormalizeFunctions(ctx context.Context, functions []*pprofpb.Function, stringTable []string) ([]*pb.Function, error)

func (*Normalizer) NormalizeLocations added in v0.12.0

func (n *Normalizer) NormalizeLocations(
	ctx context.Context,
	locations []*pprofpb.Location,
	mappings []mappingNormalizationInfo,
	functions []*pb.Function,
	normalizedAddress bool,
	stringTable []string,
) ([]*pb.Location, error)

func (*Normalizer) NormalizeMappings added in v0.12.0

func (n *Normalizer) NormalizeMappings(ctx context.Context, mappings []*pprofpb.Mapping, stringTable []string) ([]mappingNormalizationInfo, error)

func (*Normalizer) NormalizePprof added in v0.12.0

func (n *Normalizer) NormalizePprof(ctx context.Context, name string, p *pprofpb.Profile, normalizedAddress bool) ([]*profile.NormalizedProfile, error)

func (*Normalizer) NormalizeStacktraces added in v0.12.0

func (n *Normalizer) NormalizeStacktraces(ctx context.Context, samples []*pprofpb.Sample, locations []*pb.Location) ([]*pb.Stacktrace, error)

type Table

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

Jump to

Keyboard shortcuts

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