dataset

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package dataset defines the concept of dataset used in this benchmarking framework.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type FakeLogsDataset

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

FakeLogsDataset is an implementation of LogsDataset returning fake logs.

func NewFakeLogsDataset

func NewFakeLogsDataset(size int) *FakeLogsDataset

func (*FakeLogsDataset) Len

func (d *FakeLogsDataset) Len() int

func (*FakeLogsDataset) Logs

func (d *FakeLogsDataset) Logs(_, size int) []plog.Logs

func (*FakeLogsDataset) ShowStats

func (d *FakeLogsDataset) ShowStats()

func (*FakeLogsDataset) SizeInBytes

func (d *FakeLogsDataset) SizeInBytes() int

type FakeMetricsDataset

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

FakeMetricsDataset is an implementation of MetricsDataset returning fake metrics.

func NewFakeMetricsDataset

func NewFakeMetricsDataset(size int) *FakeMetricsDataset

func (*FakeMetricsDataset) Len

func (d *FakeMetricsDataset) Len() int

func (*FakeMetricsDataset) Metrics

func (d *FakeMetricsDataset) Metrics(_, size int) []pmetric.Metrics

type FakeTraceDataset

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

FakeTraceDataset is an implementation of TraceDataset returning fake traces.

func NewFakeTraceDataset

func NewFakeTraceDataset(size int) *FakeTraceDataset

func (*FakeTraceDataset) Len

func (d *FakeTraceDataset) Len() int

func (*FakeTraceDataset) Traces

func (d *FakeTraceDataset) Traces(_, size int) []ptrace.Traces

type LogsDataset

type LogsDataset interface {
	Len() int
	ShowStats()
	Logs(start, size int) []plog.Logs
	SizeInBytes() int
}

type MetricsDataset

type MetricsDataset interface {
	Len() int
	Metrics(start, size int) []pmetric.Metrics
}

type RealLogsDataset

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

RealLogsDataset represents a dataset of real logs read from a Logs serialized to a binary file.

func NewRealLogsDataset

func NewRealLogsDataset(path string, compression string, format string) *RealLogsDataset

NewRealLogsDataset creates a new RealLogsDataset from a binary file which is either formatted as otlp protobuf or compressed otlp json.

func (*RealLogsDataset) Len

func (d *RealLogsDataset) Len() int

Len returns the number of log records in the dataset.

func (*RealLogsDataset) Logs

func (d *RealLogsDataset) Logs(offset, size int) []plog.Logs

Logs returns a subset of log records from the original dataset.

func (*RealLogsDataset) Resize

func (d *RealLogsDataset) Resize(size int)

Resize resizes the dataset to the specified size.

func (*RealLogsDataset) ShowStats

func (d *RealLogsDataset) ShowStats()

func (*RealLogsDataset) SizeInBytes

func (d *RealLogsDataset) SizeInBytes() int

type RealMetricsDataset

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

RealMetricsDataset represents a dataset of real metrics read from a Metrics serialized to a binary file.

func NewRealMetricsDataset

func NewRealMetricsDataset(path string, compression string, format string) *RealMetricsDataset

NewRealMetricsDataset creates a new RealMetricsDataset from a binary file which is either formatted as otlp protobuf or compressed otlp json.

func (*RealMetricsDataset) Len

func (d *RealMetricsDataset) Len() int

Len returns the number of metrics in the dataset.

func (*RealMetricsDataset) Metrics

func (d *RealMetricsDataset) Metrics(offset, size int) []pmetric.Metrics

Metrics returns a subset of metrics from the original dataset.

func (*RealMetricsDataset) Resize

func (d *RealMetricsDataset) Resize(maxSize int)

Resize resizes the dataset to the specified max size or do nothing if the current size is already lower than the specified max size.

func (*RealMetricsDataset) ShowStats

func (d *RealMetricsDataset) ShowStats()

func (*RealMetricsDataset) SizeInBytes

func (d *RealMetricsDataset) SizeInBytes() int

type RealTraceDataset

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

func NewRealTraceDataset

func NewRealTraceDataset(path string, compression string, format string, sortOrder []string) *RealTraceDataset

NewRealTraceDataset creates a new RealTraceDataset from a binary file which is either formatted as otlp protobuf or compressed otlp json.

func (*RealTraceDataset) Len

func (d *RealTraceDataset) Len() int

func (*RealTraceDataset) Resize

func (d *RealTraceDataset) Resize(size int)

func (*RealTraceDataset) ShowStats

func (d *RealTraceDataset) ShowStats()

func (*RealTraceDataset) SizeInBytes

func (d *RealTraceDataset) SizeInBytes() int

func (*RealTraceDataset) Traces

func (d *RealTraceDataset) Traces(offset, size int) []ptrace.Traces

type TraceDataset

type TraceDataset interface {
	Len() int
	Traces(start, size int) []ptrace.Traces
}

Jump to

Keyboard shortcuts

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