benchmark

package
v0.0.0-...-b8497f2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BenchmarkConfigYAML

type BenchmarkConfigYAML struct {
	Models        []ModelConfig    `yaml:"models"`
	TestScenarios []ScenarioConfig `yaml:"test_scenarios"`
	Metrics       []string         `yaml:"metrics"`
	Output        OutputConfig     `yaml:"output"`
}

type BenchmarkReport

type BenchmarkReport struct {
	Results    []services.BenchmarkResult
	Summary    string
	ReportPath string
}

type BenchmarkRequest

type BenchmarkRequest struct {
	ConfigPath       string
	OutputDir        string
	ExportPrometheus bool
}

type BenchmarkService

type BenchmarkService interface {
	RunBenchmark(ctx context.Context, req BenchmarkRequest) (*BenchmarkReport, error)
}

type Config

type Config struct {
	Benchmark BenchmarkConfigYAML `yaml:"benchmark"`
}

Config structures mirroring configs/benchmark.yaml

type DefaultBenchmarkService

type DefaultBenchmarkService struct {
	Runner *services.BenchmarkRunner
}

func NewDefaultBenchmarkService

func NewDefaultBenchmarkService() *DefaultBenchmarkService

func (*DefaultBenchmarkService) RunBenchmark

type ModelConfig

type ModelConfig struct {
	Name       string `yaml:"name"`
	Type       string `yaml:"type"`
	ConfigPath string `yaml:"config_path"`
}

type OutputConfig

type OutputConfig struct {
	ReportDir        string `yaml:"report_dir"`
	ExportPrometheus bool   `yaml:"export_prometheus"`
	PrometheusPort   int    `yaml:"prometheus_port"`
}

type RealModelWrapper

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

RealModelWrapper adapts the generation.Service to TraceGeneratorModel interface

func (*RealModelWrapper) Generate

func (m *RealModelWrapper) Generate(ctx context.Context, count int) ([]models.SQLTrace, error)

func (*RealModelWrapper) Name

func (m *RealModelWrapper) Name() string

type ScenarioConfig

type ScenarioConfig struct {
	Name        string `yaml:"name"`
	TraceCount  int    `yaml:"trace_count"`
	Concurrency int    `yaml:"concurrency"`
}

Jump to

Keyboard shortcuts

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