Documentation
¶
Index ¶
Constants ¶
View Source
const ( MemoryTestIterations = 5 SamplingIntervalMs = 1 GCSettleTimeMs = 5 FinalSampleWaitMs = 2 )
Constants for memory testing
Variables ¶
This section is empty.
Functions ¶
func Percentile ¶
Percentile calculates the percentile of sorted values
Types ¶
type BenchmarkResult ¶
type BenchmarkResult struct { TestName string `json:"test_name"` Language string `json:"language"` DataSize int `json:"data_size"` Concurrency int `json:"concurrency"` EncryptLatencyMs float64 `json:"encrypt_latency_ms"` DecryptLatencyMs float64 `json:"decrypt_latency_ms"` EndToEndLatencyMs float64 `json:"end_to_end_latency_ms"` OpsPerSecond float64 `json:"ops_per_second"` BytesPerSecond float64 `json:"bytes_per_second"` PeakMemoryMB float64 `json:"peak_memory_mb"` MemoryEfficiency float64 `json:"memory_efficiency_ratio"` P50Latency float64 `json:"p50_latency"` P95Latency float64 `json:"p95_latency"` P99Latency float64 `json:"p99_latency"` Timestamp string `json:"timestamp"` GoVersion string `json:"go_version"` CPUCount int `json:"cpu_count"` TotalMemoryGB float64 `json:"total_memory_gb"` }
BenchmarkResult represents the results of a single benchmark test
type ESDKBenchmark ¶
type ESDKBenchmark struct { Config TestConfig EsdkClient *esdksmithygenerated.Client Keyring mpltypes.IKeyring Results []BenchmarkResult CPUCount int TotalMemoryGB float64 }
ESDKBenchmark is the main benchmark struct
func (*ESDKBenchmark) GenerateTestData ¶
func (b *ESDKBenchmark) GenerateTestData(size int) []byte
GenerateTestData creates test data of specified size
func (*ESDKBenchmark) RunAllBenchmarks ¶
func (b *ESDKBenchmark) RunAllBenchmarks() error
RunAllBenchmarks runs all configured benchmark tests
func (*ESDKBenchmark) SaveResults ¶
func (b *ESDKBenchmark) SaveResults(outputPath string) error
SaveResults saves benchmark results to JSON file
type MemorySample ¶
type MemorySample struct { Timestamp time.Time HeapMB float64 MetricsAllocsMB float64 MemStatsAllocsMB float64 }
MemorySample represents a single memory measurement
type QuickConfig ¶
type QuickConfig struct { DataSizes struct { Small []int `yaml:"small"` } `yaml:"data_sizes"` Iterations struct { Warmup int `yaml:"warmup"` Measurement int `yaml:"measurement"` } `yaml:"iterations"` ConcurrencyLevels []int `yaml:"concurrency_levels"` TestTypes []string `yaml:"test_types"` }
QuickConfig represents the quick test configuration
type TestConfig ¶
type TestConfig struct { DataSizes struct { Small []int `yaml:"small"` Medium []int `yaml:"medium"` Large []int `yaml:"large"` } `yaml:"data_sizes"` Iterations struct { Warmup int `yaml:"warmup"` Measurement int `yaml:"measurement"` } `yaml:"iterations"` ConcurrencyLevels []int `yaml:"concurrency_levels"` QuickConfig *QuickConfig `yaml:"quick_config"` }
TestConfig represents the configuration for benchmark tests
func LoadConfig ¶
func LoadConfig(configPath string) (TestConfig, error)
LoadConfig loads the test configuration from YAML file
Click to show internal directories.
Click to hide internal directories.