bench

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BenchmarkCount

func BenchmarkCount(b *testing.B)

func BenchmarkFilter

func BenchmarkFilter(b *testing.B)

func BenchmarkFlightThroughput

func BenchmarkFlightThroughput(b *testing.B)

Benchmark function for Go's testing framework

func RunFlightThroughputBenchmarks

func RunFlightThroughputBenchmarks(serverAddr, parquetDir string) error

RunFlightThroughputBenchmarks runs all Flight throughput benchmarks

func TestFlightThroughputBenchmark

func TestFlightThroughputBenchmark(t *testing.T)

Test function for the benchmark

func WriteCSV

func WriteCSV(results []Result, w io.Writer) error

WriteCSV writes results in CSV format.

func WriteJSON

func WriteJSON(results []Result, w io.Writer) error

WriteJSON writes results to w in JSON format.

func WriteMarkdown

func WriteMarkdown(results []Result, w io.Writer) error

WriteMarkdown renders results as a simple Markdown table.

Types

type BenchmarkResult

type BenchmarkResult struct {
	Name         string
	Duration     time.Duration
	RowsReturned int64
	BatchCount   int
	Throughput   float64 // rows per second
	DataSize     int64   // bytes processed (if available)
}

BenchmarkResult represents the result of a benchmark run

func (*BenchmarkResult) String

func (r *BenchmarkResult) String() string

type FlightThroughputBenchmark

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

FlightThroughputBenchmark measures Flight protocol throughput

func NewFlightThroughputBenchmark

func NewFlightThroughputBenchmark(serverAddr, parquetDir string) *FlightThroughputBenchmark

NewFlightThroughputBenchmark creates a new benchmark instance

func (*FlightThroughputBenchmark) BenchmarkAggregation

func (b *FlightThroughputBenchmark) BenchmarkAggregation(tableName string) (*BenchmarkResult, error)

BenchmarkAggregation measures throughput for aggregation queries

func (*FlightThroughputBenchmark) BenchmarkFilteredQuery

func (b *FlightThroughputBenchmark) BenchmarkFilteredQuery(tableName string) (*BenchmarkResult, error)

BenchmarkFilteredQuery measures throughput for filtered queries

func (*FlightThroughputBenchmark) BenchmarkFullTableScan

func (b *FlightThroughputBenchmark) BenchmarkFullTableScan(tableName string) (*BenchmarkResult, error)

BenchmarkFullTableScan measures throughput for full table scans

func (*FlightThroughputBenchmark) BenchmarkJoinQuery

func (b *FlightThroughputBenchmark) BenchmarkJoinQuery(table1, table2 string) (*BenchmarkResult, error)

BenchmarkJoinQuery measures throughput for join operations

func (*FlightThroughputBenchmark) BenchmarkMetadata

func (b *FlightThroughputBenchmark) BenchmarkMetadata() (*BenchmarkResult, error)

BenchmarkMetadata measures throughput for metadata operations

func (*FlightThroughputBenchmark) BenchmarkPreparedStatement

func (b *FlightThroughputBenchmark) BenchmarkPreparedStatement(tableName string) (*BenchmarkResult, error)

BenchmarkPreparedStatement measures throughput for prepared statements

func (*FlightThroughputBenchmark) BenchmarkStreaming

func (b *FlightThroughputBenchmark) BenchmarkStreaming(tableName string) (*BenchmarkResult, error)

BenchmarkStreaming measures throughput for streaming queries

func (*FlightThroughputBenchmark) BenchmarkSustainedThroughput

func (b *FlightThroughputBenchmark) BenchmarkSustainedThroughput(tableName string, iterations int) (*BenchmarkResult, error)

BenchmarkSustainedThroughput measures sustained throughput by loading the largest file multiple times

func (*FlightThroughputBenchmark) Cleanup

func (b *FlightThroughputBenchmark) Cleanup() error

Cleanup releases resources

func (*FlightThroughputBenchmark) Setup

func (b *FlightThroughputBenchmark) Setup() error

Setup initializes the benchmark

type Result

type Result struct {
	Name       string        `json:"name"`
	N          int           `json:"iterations"`
	NsPerOp    time.Duration `json:"ns_per_op"`
	BytesPerOp int64         `json:"bytes_per_op"`
}

Result holds a single benchmark measurement.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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