Documentation ¶
Index ¶
- Constants
- Variables
- func ArrowRecordToStacktraceSamples(ctx context.Context, metaStore metastore.ProfileMetaStore, ar arrow.Record, ...) (*profile.StacktraceSamples, error)
- func FlatProfileToBuffer(logger log.Logger, inLs labels.Labels, schema *dynparquet.Schema, ...) (*dynparquet.Buffer, error)
- func InsertProfileIntoTable(ctx context.Context, logger log.Logger, table Table, ls labels.Labels, ...) (int, error)
- func Schema() *dynparquet.Schema
- type Sample
- type Samples
- type Table
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 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 (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) }
Click to show internal directories.
Click to hide internal directories.