Documentation ¶
Overview ¶
Package benchmark is a framework for benchmarking the performance of the OTLP protocol vs the OTLP Arrow protocol.
Index ¶
- Constants
- Variables
- func ProfileableSystemID(ps ProfileableSystem) string
- type ColumnConfig
- type CompressionAlgorithm
- type Config
- type Lz4CompressionAlgo
- type NoCompressionAlgo
- type ProfileOptions
- type ProfileableSystem
- type Profiler
- func (p *Profiler) AddSectionWithTotal(section *SectionConfig, table *tablewriter.Table, ...)
- func (p *Profiler) AddSeparator(table *tablewriter.Table)
- func (p *Profiler) AddStep(section *SectionConfig, table *tablewriter.Table, ...)
- func (p *Profiler) AddTitle(table *tablewriter.Table, title string, titleColor []int)
- func (p *Profiler) CheckProcessingResults()
- func (p *Profiler) ExportMetricsBytesCSV(filePrefix string)
- func (p *Profiler) ExportMetricsTimesCSV(filePrefix string)
- func (p *Profiler) PrintCompressionRatio(maxIter uint64)
- func (p *Profiler) PrintPhase1StepsTiming(_ uint64)
- func (p *Profiler) PrintPhase2StepsTiming(_ uint64)
- func (p *Profiler) PrintResults(maxIter uint64)
- func (p *Profiler) Printf(format string, a ...any)
- func (p *Profiler) Profile(profileable ProfileableSystem, maxIter uint64) error
- type SectionConfig
- type ZstdCompressionAlgo
Constants ¶
View Source
const CompressionTypeZstd = "zstd"
Variables ¶
View Source
var ( OtlpArrowConversionSection = NewSectionConfig("otel_arrow_conversion_sec", "OTLP -> OTel Arrow conv.", false) OtlpConversionSection = NewSectionConfig("otel_conversion_sec", "OTel Arrow -> OTLP conv.", false) SerializationSection = NewSectionConfig("serialization_sec", "Protobuf serialization", false) CompressionSection = NewSectionConfig("compression_sec", "Compression", false) DecompressionSection = NewSectionConfig("decompression_sec", "Decompression", false) DeserializationSection = NewSectionConfig("deserialization_sec", "Protobuf deserialization", false) TotalEncodingTimeSection = NewSectionConfig("total_encoding_time_sec", "Sub total", false) TotalDecodingTimeSection = NewSectionConfig("total_decoding_time_sec", "Sub total", false) Phase1TotalTimeSection = NewSectionConfig("total_time_sec", "Total", true) Phase2TotalTimeSection = NewSectionConfig("total_time_sec", "Total", false) ProcessingSection = NewSectionConfig("processing_sec", "Batch processing", false) UncompressedSizeSection = NewSectionConfig("uncompressed_size", "Uncompressed (bytes)", false) CompressedSizeSection = NewSectionConfig("compressed_size", "Compressed (bytes)", false) )
Section identifiers used in the benchmark output.
Functions ¶
func ProfileableSystemID ¶
func ProfileableSystemID(ps ProfileableSystem) string
Types ¶
type ColumnConfig ¶
type ColumnConfig struct {
// contains filtered or unexported fields
}
ColumnConfig is the configuration for a column of the benchmark table output.
func DefaultColumnConfig ¶
func DefaultColumnConfig() *ColumnConfig
DefaultColumnConfig creates a default column config.
func (*ColumnConfig) MetricNotApplicable ¶
func (c *ColumnConfig) MetricNotApplicable() *ColumnConfig
func (*ColumnConfig) SubTitle ¶
func (c *ColumnConfig) SubTitle(subTitle string) *ColumnConfig
type CompressionAlgorithm ¶
type CompressionAlgorithm interface { fmt.Stringer Compress(data []byte) ([]byte, error) Decompress(data []byte) ([]byte, error) }
func Lz4 ¶
func Lz4() CompressionAlgorithm
func NoCompression ¶
func NoCompression() CompressionAlgorithm
func Zstd ¶
func Zstd() CompressionAlgorithm
type Lz4CompressionAlgo ¶
type Lz4CompressionAlgo struct{}
func (*Lz4CompressionAlgo) Compress ¶
func (c *Lz4CompressionAlgo) Compress(data []byte) ([]byte, error)
func (*Lz4CompressionAlgo) Decompress ¶
func (c *Lz4CompressionAlgo) Decompress(data []byte) ([]byte, error)
func (*Lz4CompressionAlgo) String ¶
func (c *Lz4CompressionAlgo) String() string
type NoCompressionAlgo ¶
type NoCompressionAlgo struct{}
func (*NoCompressionAlgo) Compress ¶
func (c *NoCompressionAlgo) Compress(data []byte) ([]byte, error)
func (*NoCompressionAlgo) Decompress ¶
func (c *NoCompressionAlgo) Decompress(data []byte) ([]byte, error)
func (*NoCompressionAlgo) String ¶
func (c *NoCompressionAlgo) String() string
type ProfileOptions ¶
type ProfileOptions struct {
UnaryRpcMode bool
}
type ProfileableSystem ¶
type ProfileableSystem interface { Name() string Tags() []string DatasetSize() int CompressionAlgorithm() CompressionAlgorithm StartProfiling(writer io.Writer) EndProfiling(writer io.Writer) InitBatchSize(writer io.Writer, batchSize int) PrepareBatch(writer io.Writer, startAt, size int) ConvertOtlpToOtlpArrow(writer io.Writer, startAt, size int) Process(writer io.Writer) string Serialize(writer io.Writer) ([][]byte, error) Deserialize(writer io.Writer, buffers [][]byte) ConvertOtlpArrowToOtlp(writer io.Writer) Clear() ShowStats() }
type Profiler ¶
type Profiler struct {
// contains filtered or unexported fields
}
Profiler is the main profiler object used to implement benchmarks.
func (*Profiler) AddSectionWithTotal ¶
func (p *Profiler) AddSectionWithTotal(section *SectionConfig, table *tablewriter.Table, values map[string]*stats.Summary, transform func(float64) float64, maxIter uint64)
func (*Profiler) AddSeparator ¶
func (p *Profiler) AddSeparator(table *tablewriter.Table)
func (*Profiler) AddStep ¶
func (p *Profiler) AddStep( section *SectionConfig, table *tablewriter.Table, values map[string]*stats.Summary, transform func(float64) float64, titleColor []int)
func (*Profiler) AddTitle ¶
func (p *Profiler) AddTitle(table *tablewriter.Table, title string, titleColor []int)
func (*Profiler) CheckProcessingResults ¶
func (p *Profiler) CheckProcessingResults()
func (*Profiler) ExportMetricsBytesCSV ¶
func (*Profiler) ExportMetricsTimesCSV ¶
func (*Profiler) PrintCompressionRatio ¶
func (*Profiler) PrintPhase1StepsTiming ¶
func (*Profiler) PrintPhase2StepsTiming ¶
func (*Profiler) PrintResults ¶
type SectionConfig ¶
SectionConfig is the configuration for a section of the benchmark table output.
func NewSectionConfig ¶
func NewSectionConfig(sectionID string, title string, total bool) *SectionConfig
NewSectionConfig creates a new SectionConfig with default values.
func (*SectionConfig) CustomColumnFor ¶
func (sc *SectionConfig) CustomColumnFor(ps ProfileableSystem) *ColumnConfig
func (*SectionConfig) MetricNotApplicable ¶
func (sc *SectionConfig) MetricNotApplicable(columnID string) bool
func (*SectionConfig) SubTitle ¶
func (sc *SectionConfig) SubTitle(columnID string) string
type ZstdCompressionAlgo ¶
type ZstdCompressionAlgo struct {
// contains filtered or unexported fields
}
func (*ZstdCompressionAlgo) Compress ¶
func (c *ZstdCompressionAlgo) Compress(data []byte) ([]byte, error)
func (*ZstdCompressionAlgo) Decompress ¶
func (c *ZstdCompressionAlgo) Decompress(data []byte) ([]byte, error)
func (*ZstdCompressionAlgo) String ¶
func (c *ZstdCompressionAlgo) String() string
Directories ¶
Path | Synopsis |
---|---|
Package dataset defines the concept of dataset used in this benchmarking framework.
|
Package dataset defines the concept of dataset used in this benchmarking framework. |
Package profileable defines the different protocols that can be profiled.
|
Package profileable defines the different protocols that can be profiled. |
arrow
Package arrow implements the Profile interface for the OTLP Arrow protocol.
|
Package arrow implements the Profile interface for the OTLP Arrow protocol. |
otlp
Package otlp implements the Profile interface for the OTLP protocol.
|
Package otlp implements the Profile interface for the OTLP protocol. |
Click to show internal directories.
Click to hide internal directories.