From 16ba59085eed057048fe38b80c2d84fc2036fe66 Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Fri, 5 Sep 2025 22:38:41 -0700 Subject: [PATCH 01/14] auto commit --- .../benchmarks/config/test-scenarios.yaml | 47 +++ .../benchmarks/go/README.md | 45 +++ .../go/benchmark/benchmark_tests.go | 172 +++++++++ .../benchmarks/go/benchmark/config.go | 67 ++++ .../go/benchmark/dbesdk_benchmark.go | 188 ++++++++++ .../benchmarks/go/benchmark/keyringsetup.go | 30 ++ .../benchmarks/go/benchmark/results.go | 117 ++++++ .../benchmarks/go/benchmark/testRunners.go | 352 ++++++++++++++++++ .../benchmarks/go/go.mod | 50 +++ .../benchmarks/go/go.sum | 103 +++++ .../benchmarks/go/main.go | 104 ++++++ .../benchmarks/java/README.md | 190 ++++++++++ .../benchmarks/java/pom.xml | 255 +++++++++++++ .../amazon/esdk/benchmark/ESDKBenchmark.java | 347 +++++++++++++++++ .../com/amazon/esdk/benchmark/Program.java | 122 ++++++ .../java/com/amazon/esdk/benchmark/Tests.java | 228 ++++++++++++ .../benchmark/model/BenchmarkMetadata.java | 24 ++ .../amazon/esdk/benchmark/model/Config.java | 99 +++++ .../amazon/esdk/benchmark/model/Report.java | 57 +++ 19 files changed, 2597 insertions(+) create mode 100644 db-esdk-performance-testing/benchmarks/config/test-scenarios.yaml create mode 100644 db-esdk-performance-testing/benchmarks/go/README.md create mode 100644 db-esdk-performance-testing/benchmarks/go/benchmark/benchmark_tests.go create mode 100644 db-esdk-performance-testing/benchmarks/go/benchmark/config.go create mode 100644 db-esdk-performance-testing/benchmarks/go/benchmark/dbesdk_benchmark.go create mode 100644 db-esdk-performance-testing/benchmarks/go/benchmark/keyringsetup.go create mode 100644 db-esdk-performance-testing/benchmarks/go/benchmark/results.go create mode 100644 db-esdk-performance-testing/benchmarks/go/benchmark/testRunners.go create mode 100644 db-esdk-performance-testing/benchmarks/go/go.mod create mode 100644 db-esdk-performance-testing/benchmarks/go/go.sum create mode 100644 db-esdk-performance-testing/benchmarks/go/main.go create mode 100644 db-esdk-performance-testing/benchmarks/java/README.md create mode 100644 db-esdk-performance-testing/benchmarks/java/pom.xml create mode 100644 db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/ESDKBenchmark.java create mode 100644 db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Program.java create mode 100644 db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Tests.java create mode 100644 db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/BenchmarkMetadata.java create mode 100644 db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/Config.java create mode 100644 db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/Report.java diff --git a/db-esdk-performance-testing/benchmarks/config/test-scenarios.yaml b/db-esdk-performance-testing/benchmarks/config/test-scenarios.yaml new file mode 100644 index 000000000..394dfb3eb --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/config/test-scenarios.yaml @@ -0,0 +1,47 @@ +# DB-ESDK Performance Test Scenarios Configuration + +# Data sizes to test (in bytes) +# Categories are for organization only - code processes all sizes regardless of category +data_sizes: + small: + - 1024 # 1KB + - 5120 # 5KB + - 10240 # 10KB + medium: + - 102400 # 100KB + - 400000 # 400KB + +# Quick test configuration (reduced test set for faster execution) +quick_config: + data_sizes: + small: + - 102400 # 100KB - within DynamoDB's 400KB limit + iterations: + warmup: 3 # Reduced warmup iterations + measurement: 3 # Reduced measurement iterations + concurrency_levels: + - 1 + - 2 + test_types: + - "throughput" + - "memory" + - "concurrency" + +# Test iterations for statistical significance +iterations: + warmup: 5 # Warmup iterations (not counted) + measurement: 10 # Measurement iterations + +# Concurrency levels to test +concurrency_levels: + - 1 + - 2 + - 4 + - 8 + - 16 + +# DynamoDB table name +table_name: "dbesdk-performance-testing" + +# Keyring +keyring: "raw-aes" \ No newline at end of file diff --git a/db-esdk-performance-testing/benchmarks/go/README.md b/db-esdk-performance-testing/benchmarks/go/README.md new file mode 100644 index 000000000..0d69f41d8 --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/go/README.md @@ -0,0 +1,45 @@ +# ESDK Go Benchmark + +Performance benchmark suite for the AWS Encryption SDK (ESDK) Go implementation. + +## Quick Start + +```bash +# Run quick benchmark +go run . --config ../../config/test-scenarios.yaml --quick + +# Run full benchmark +go run . --config ../../config/test-scenarios.yaml +``` + +## Build + +```bash +# Build release binary +go build -o esdk-benchmark . + +# Run built binary +./esdk-benchmark --quick +``` + +## Configuration + +The benchmark uses YAML configuration files. See `../../config/test-scenarios.yaml` for the full configuration format. + +### Quick Mode + +Quick mode runs a subset of tests with reduced iterations: + +- Only runs test types specified in `quick_config.test_types` +- Uses smaller data sizes from `quick_config.data_sizes.small` +- Fewer iterations: `quick_config.iterations.measurement` + +## Test Types + +- **throughput**: Measures operations per second and latency +- **memory**: Measures peak memory usage during operations +- **concurrency**: Tests performance under concurrent load + +## Output + +Results are saved to JSON format in `../../results/raw-data/go_results.json` by default. diff --git a/db-esdk-performance-testing/benchmarks/go/benchmark/benchmark_tests.go b/db-esdk-performance-testing/benchmarks/go/benchmark/benchmark_tests.go new file mode 100644 index 000000000..f15485993 --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/go/benchmark/benchmark_tests.go @@ -0,0 +1,172 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package benchmark + +import ( + "bytes" + "context" + "fmt" + "runtime/metrics" + "strconv" + "time" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/dynamodb" + "github.com/aws/aws-sdk-go-v2/service/dynamodb/types" +) + +// === Helper Functions === + +// runBatchPutGetCycle performs a BatchWriteItem-BatchGetItem cycle with 25 items and measures performance +func (b *DBESDKBenchmark) runBatchPutGetCycle(data []byte) (float64, float64, error) { + ctx := context.Background() + tableName := b.Config.TableName + + // Create 25 write requests with same data, different sort_key + var items []map[string]types.AttributeValue + + for i := 0; i < 25; i++ { + item := map[string]types.AttributeValue{ + "partition_key": &types.AttributeValueMemberS{Value: "benchmark-test"}, + "sort_key": &types.AttributeValueMemberN{Value: strconv.Itoa(i)}, + "attribute1": &types.AttributeValueMemberM{Value: map[string]types.AttributeValue{ + "data": &types.AttributeValueMemberB{Value: data}, + }}, + "attribute2": &types.AttributeValueMemberS{Value: "sign me!"}, + ":attribute3": &types.AttributeValueMemberS{Value: "ignore me!"}, + } + items = append(items, item) + } + + var writeRequests []types.WriteRequest + for _, item := range items { + writeRequests = append(writeRequests, types.WriteRequest{ + PutRequest: &types.PutRequest{Item: item}, + }) + } + + // BatchWriteItem + batchWriteStart := time.Now() + _, err := b.DbesdkClient.BatchWriteItem(ctx, &dynamodb.BatchWriteItemInput{ + RequestItems: map[string][]types.WriteRequest{tableName: writeRequests}, + }) + if err != nil { + return 0, 0, fmt.Errorf("BatchWriteItem failed: %w", err) + } + batchWriteDuration := time.Since(batchWriteStart).Seconds() * 1000 + + // Create 25 keys for BatchGetItem + var keys []map[string]types.AttributeValue + for i := 0; i < 25; i++ { + keys = append(keys, map[string]types.AttributeValue{ + "partition_key": &types.AttributeValueMemberS{Value: "benchmark-test"}, + "sort_key": &types.AttributeValueMemberN{Value: strconv.Itoa(i)}, + }) + } + + // BatchGetItem + batchGetStart := time.Now() + result, err := b.DbesdkClient.BatchGetItem(ctx, &dynamodb.BatchGetItemInput{ + RequestItems: map[string]types.KeysAndAttributes{ + tableName: {Keys: keys, ConsistentRead: aws.Bool(true)}, + }, + }) + if err != nil { + return 0, 0, fmt.Errorf("BatchGetItem failed: %w", err) + } + batchGetDuration := time.Since(batchGetStart).Seconds() * 1000 + + // Verify 25 items retrieved with correct data size + returnedItems := result.Responses[tableName] + if len(returnedItems) != 25 { + return 0, 0, fmt.Errorf("expected 25 items, got %d", len(returnedItems)) + } + + // Verify each returned item + for i, item := range returnedItems { + if _, ok := item["attribute1"]; !ok { + return 0, 0, fmt.Errorf("item %d missing attribute1", i) + } + + // Verify attribute1 + if attr1, ok := item["attribute1"].(*types.AttributeValueMemberM); ok { + if dataAttr, ok := attr1.Value["data"].(*types.AttributeValueMemberB); ok { + if !bytes.Equal(dataAttr.Value, data) { + return 0, 0, fmt.Errorf("item %d data mismatch", i) + } + } + } + + // Verify attribute2 value + if attr2, ok := item["attribute2"].(*types.AttributeValueMemberS); ok { + if attr2.Value != "sign me!" { + return 0, 0, fmt.Errorf("item %d attribute2 mismatch: got %s", i, attr2.Value) + } + } else { + return 0, 0, fmt.Errorf("item %d attribute2 wrong type", i) + } + + // Verify :attribute3 value + if attr3, ok := item[":attribute3"].(*types.AttributeValueMemberS); ok { + if attr3.Value != "ignore me!" { + return 0, 0, fmt.Errorf("item %d :attribute3 mismatch: got %s", i, attr3.Value) + } + } else { + return 0, 0, fmt.Errorf("item %d :attribute3 wrong type", i) + } + } + + return batchWriteDuration, batchGetDuration, nil +} + +// shouldRunTestType checks if a test type should be run based on quick config +func (b *DBESDKBenchmark) shouldRunTestType(testType string) bool { + if b.Config.QuickConfig == nil || len(b.Config.QuickConfig.TestTypes) == 0 { + return true + } + + for _, allowedType := range b.Config.QuickConfig.TestTypes { + if allowedType == testType { + return true + } + } + return false +} + +// === Memory Test Implementation === + +// sampleMemoryContinuously runs continuous memory sampling during operation +func (b *DBESDKBenchmark) sampleMemoryContinuously(beforeHeap, beforeAllocs uint64, stopChan chan bool) []MemorySample { + var samples []MemorySample + ticker := time.NewTicker(SamplingIntervalMs * time.Millisecond) + defer ticker.Stop() + + for { + select { + case <-stopChan: + return samples + case <-ticker.C: + var currentSamples [2]metrics.Sample + currentSamples[0].Name = "/memory/classes/heap/objects:bytes" + currentSamples[1].Name = "/gc/heap/allocs:bytes" + metrics.Read(currentSamples[:]) + + var heapDelta, allocsDelta uint64 + if currentSamples[0].Value.Uint64() > beforeHeap { + heapDelta = currentSamples[0].Value.Uint64() - beforeHeap + } + if currentSamples[1].Value.Uint64() > beforeAllocs { + allocsDelta = currentSamples[1].Value.Uint64() - beforeAllocs + } + + sample := MemorySample{ + Timestamp: time.Now(), + HeapMB: float64(heapDelta) / (1024 * 1024), + MetricsAllocsMB: float64(allocsDelta) / (1024 * 1024), + MemStatsAllocsMB: 0, + } + samples = append(samples, sample) + } + } +} diff --git a/db-esdk-performance-testing/benchmarks/go/benchmark/config.go b/db-esdk-performance-testing/benchmarks/go/benchmark/config.go new file mode 100644 index 000000000..2d50b3164 --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/go/benchmark/config.go @@ -0,0 +1,67 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package benchmark + +import ( + "fmt" + "os" + + "gopkg.in/yaml.v3" +) + +type KeyringType string + +const ( + RawAESKeying KeyringType = "raw-aes" +) + +// TestConfig represents the configuration for benchmark tests +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"` + TableName string `yaml:"table_name"` + Keyring KeyringType `yaml:"keyring"` +} + +// QuickConfig represents the quick test configuration +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"` +} + +// LoadConfig loads the test configuration from YAML file +func LoadConfig(configPath string) (TestConfig, error) { + var config TestConfig + + if _, err := os.Stat(configPath); os.IsNotExist(err) { + return config, fmt.Errorf("config file not found: %s", configPath) + } + + data, err := os.ReadFile(configPath) + if err != nil { + return config, fmt.Errorf("failed to read config file: %w", err) + } + + if err := yaml.Unmarshal(data, &config); err != nil { + return config, fmt.Errorf("failed to parse config file: %w", err) + } + + return config, nil +} diff --git a/db-esdk-performance-testing/benchmarks/go/benchmark/dbesdk_benchmark.go b/db-esdk-performance-testing/benchmarks/go/benchmark/dbesdk_benchmark.go new file mode 100644 index 000000000..23b8bd43e --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/go/benchmark/dbesdk_benchmark.go @@ -0,0 +1,188 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package benchmark + +import ( + "context" + "crypto/rand" + "fmt" + "log" + "net/url" + "runtime" + + mplsmithygenerated "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/awscryptographymaterialproviderssmithygenerated" + mpltypes "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/awscryptographymaterialproviderssmithygeneratedtypes" + dbesdkdynamodbencryptiontypes "github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk/awscryptographydbencryptionsdkdynamodbsmithygeneratedtypes" + dbesdkstructuredencryptiontypes "github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk/awscryptographydbencryptionsdkstructuredencryptionsmithygeneratedtypes" + "github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk/dbesdkmiddleware" + "github.com/aws/aws-sdk-go-v2/config" + "github.com/aws/aws-sdk-go-v2/service/dynamodb" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/shirou/gopsutil/v3/mem" +) + +// Constants for memory testing +const ( + MemoryTestIterations = 5 + SamplingIntervalMs = 1 + GCSettleTimeMs = 5 + FinalSampleWaitMs = 2 +) + +// DBESDKBenchmark is the main benchmark struct +type DBESDKBenchmark struct { + Config TestConfig + DbesdkClient *dynamodb.Client + Keyring mpltypes.IKeyring + Results []BenchmarkResult + CPUCount int + TotalMemoryGB float64 +} + +// New creates a new benchmark instance +func New(configPath string) (*DBESDKBenchmark, error) { + benchmark := &DBESDKBenchmark{ + CPUCount: runtime.NumCPU(), + } + + // Get system memory + if vmStat, err := mem.VirtualMemory(); err == nil { + benchmark.TotalMemoryGB = float64(vmStat.Total) / (1024 * 1024 * 1024) + } + + // Load configuration + config, err := LoadConfig(configPath) + if err != nil { + return nil, fmt.Errorf("failed to load config: %w", err) + } + benchmark.Config = config + + // Setup MPL + if err := benchmark.setupMPL(); err != nil { + return nil, fmt.Errorf("failed to setup MPL: %w", err) + } + + // Setup DB-ESDK + if err := benchmark.setupDBESDK(); err != nil { + return nil, fmt.Errorf("failed to setup DB-ESDK: %w", err) + } + + log.Printf("Initialized DB-ESDK Benchmark - CPU cores: %d, Memory: %.1fGB", + benchmark.CPUCount, benchmark.TotalMemoryGB) + + return benchmark, nil +} + +func (b *DBESDKBenchmark) setupMPL() error { + // Initialize the material providers client + matProvConfig := mpltypes.MaterialProvidersConfig{} + matProv, err := mplsmithygenerated.NewClient(matProvConfig) + if err != nil { + return fmt.Errorf("failed to create material providers client: %w", err) + } + + switch b.Config.Keyring { + case RawAESKeying: + b.Keyring, err = SetupRawAESKeyring(matProv) + if err != nil { + return fmt.Errorf("failed to create keyring: %w", err) + } + default: + return fmt.Errorf("unsupported keyring type: %s", b.Config.Keyring) + } + return nil +} + +// setupDBESDK initializes the DynamoDB client with DB-ESDK middleware and creates a default keyring which is AES keyring +func (b *DBESDKBenchmark) setupDBESDK() error { + ddbTableName := b.Config.TableName + + // Initialize the material providers client + matProvConfig := mpltypes.MaterialProvidersConfig{} + matProv, err := mplsmithygenerated.NewClient(matProvConfig) + if err != nil { + return fmt.Errorf("failed to create material providers client: %w", err) + } + + // Create default AES-256 keyring + key := make([]byte, 32) // 256-bit key + if _, err := rand.Read(key); err != nil { + return fmt.Errorf("failed to generate AES-256 key: %w", err) + } + + keyringInput := mpltypes.CreateRawAesKeyringInput{ + KeyName: "test-aes-256-key", + KeyNamespace: "DB-ESDK-performance-test", + WrappingKey: key, + WrappingAlg: mpltypes.AesWrappingAlgAlgAes256GcmIv12Tag16, + } + + keyring, err := matProv.CreateRawAesKeyring(context.Background(), keyringInput) + if err != nil { + return fmt.Errorf("failed to create keyring: %w", err) + } + b.Keyring = keyring + + attributeActions := map[string]dbesdkstructuredencryptiontypes.CryptoAction{ + "partition_key": dbesdkstructuredencryptiontypes.CryptoActionSignOnly, + "sort_key": dbesdkstructuredencryptiontypes.CryptoActionSignOnly, + "attribute1": dbesdkstructuredencryptiontypes.CryptoActionEncryptAndSign, + "attribute2": dbesdkstructuredencryptiontypes.CryptoActionSignOnly, + ":attribute3": dbesdkstructuredencryptiontypes.CryptoActionDoNothing, + } + + allowedUnsignedAttributePrefix := ":" + + partitionKey := "partition_key" + sortKeyName := "sort_key" + algorithmSuiteID := mpltypes.DBEAlgorithmSuiteIdAlgAes256GcmHkdfSha512CommitKeyEcdsaP384SymsigHmacSha384 + tableConfig := dbesdkdynamodbencryptiontypes.DynamoDbTableEncryptionConfig{ + LogicalTableName: ddbTableName, + PartitionKeyName: partitionKey, + SortKeyName: &sortKeyName, + AttributeActionsOnEncrypt: attributeActions, + Keyring: keyring, + AllowedUnsignedAttributePrefix: &allowedUnsignedAttributePrefix, + AlgorithmSuiteId: &algorithmSuiteID, + } + tableConfigsMap := make(map[string]dbesdkdynamodbencryptiontypes.DynamoDbTableEncryptionConfig) + tableConfigsMap[ddbTableName] = tableConfig + listOfTableConfigs := dbesdkdynamodbencryptiontypes.DynamoDbTablesEncryptionConfig{ + TableEncryptionConfigs: tableConfigsMap, + } + + cfg, err := config.LoadDefaultConfig(context.TODO()) + + dbEsdkMiddleware, err := dbesdkmiddleware.NewDBEsdkMiddleware(listOfTableConfigs) + ddb := dynamodb.NewFromConfig(cfg, dbEsdkMiddleware.CreateMiddleware(), func(o *dynamodb.Options) { + o.EndpointResolverV2 = &resolverV2{} + }) + + b.DbesdkClient = ddb + + log.Println("ESDK client initialized successfully") + return nil +} + +type resolverV2 struct { +} + +func (*resolverV2) ResolveEndpoint(ctx context.Context, params dynamodb.EndpointParameters) ( + smithyendpoints.Endpoint, error, +) { + u, err := url.Parse("http://localhost:8000") + if err != nil { + return smithyendpoints.Endpoint{}, err + } + return smithyendpoints.Endpoint{ + URI: *u, + }, nil +} + +// GenerateTestData creates test data of specified size +func (b *DBESDKBenchmark) GenerateTestData(size int) []byte { + data := make([]byte, size) + rand.Read(data) + return data +} diff --git a/db-esdk-performance-testing/benchmarks/go/benchmark/keyringsetup.go b/db-esdk-performance-testing/benchmarks/go/benchmark/keyringsetup.go new file mode 100644 index 000000000..da53309ee --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/go/benchmark/keyringsetup.go @@ -0,0 +1,30 @@ +package benchmark + +import ( + "context" + "crypto/rand" + "fmt" + + mplsmithygenerated "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/awscryptographymaterialproviderssmithygenerated" + mpltypes "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/awscryptographymaterialproviderssmithygeneratedtypes" +) + +func SetupRawAESKeyring(matProv *mplsmithygenerated.Client) (mpltypes.IKeyring, error) { + key := make([]byte, 32) + if _, err := rand.Read(key); err != nil { + return nil, fmt.Errorf("failed to generate AES-256 key: %w", err) + } + + keyringInput := mpltypes.CreateRawAesKeyringInput{ + KeyName: "test-aes-256-key", + KeyNamespace: "DB-ESDK-performance-test", + WrappingKey: key, + WrappingAlg: mpltypes.AesWrappingAlgAlgAes256GcmIv12Tag16, + } + + keyring, err := matProv.CreateRawAesKeyring(context.Background(), keyringInput) + if err != nil { + return nil, fmt.Errorf("failed to create keyring: %w", err) + } + return keyring, nil +} diff --git a/db-esdk-performance-testing/benchmarks/go/benchmark/results.go b/db-esdk-performance-testing/benchmarks/go/benchmark/results.go new file mode 100644 index 000000000..c71e2ad98 --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/go/benchmark/results.go @@ -0,0 +1,117 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package benchmark + +import ( + "encoding/json" + "fmt" + "math" + "os" + "path/filepath" + "runtime" + "time" +) + +// BenchmarkResult represents the results of a single benchmark test +type BenchmarkResult struct { + TestName string `json:"test_name"` + Language string `json:"language"` + DataSize int `json:"data_size"` + Concurrency int `json:"concurrency"` + PutLatencyMs float64 `json:"put_latency_ms"` + GetLatencyMs float64 `json:"get_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"` +} + +// MemorySample represents a single memory measurement +type MemorySample struct { + Timestamp time.Time + HeapMB float64 + MetricsAllocsMB float64 + MemStatsAllocsMB float64 +} + +// === Utility Functions === + +// Average calculates the average of a slice of float64 values +func Average(values []float64) float64 { + if len(values) == 0 { + return 0 + } + sum := 0.0 + for _, v := range values { + sum += v + } + return sum / float64(len(values)) +} + +// Percentile calculates the percentile of sorted values +func Percentile(sortedValues []float64, p float64) float64 { + if len(sortedValues) == 0 { + return 0 + } + if p <= 0 { + return sortedValues[0] + } + if p >= 100 { + return sortedValues[len(sortedValues)-1] + } + + index := (p / 100.0) * float64(len(sortedValues)-1) + lower := int(math.Floor(index)) + upper := int(math.Ceil(index)) + + if lower == upper { + return sortedValues[lower] + } + + weight := index - float64(lower) + return sortedValues[lower]*(1-weight) + sortedValues[upper]*weight +} + +// === Results Saving === + +// SaveResults saves benchmark results to JSON file +func (b *DBESDKBenchmark) SaveResults(outputPath string) error { + if err := os.MkdirAll(filepath.Dir(outputPath), 0755); err != nil { + return fmt.Errorf("failed to create output directory: %w", err) + } + + resultsData := map[string]interface{}{ + "metadata": map[string]interface{}{ + "language": "go", + "timestamp": time.Now().Format("2006-01-02 15:04:05"), + "go_version": runtime.Version(), + "cpu_count": b.CPUCount, + "total_memory_gb": b.TotalMemoryGB, + "total_tests": len(b.Results), + }, + "results": b.Results, + } + + file, err := os.Create(outputPath) + if err != nil { + return fmt.Errorf("failed to create output file: %w", err) + } + defer file.Close() + + encoder := json.NewEncoder(file) + encoder.SetIndent("", " ") + if err := encoder.Encode(resultsData); err != nil { + return fmt.Errorf("failed to encode results to JSON: %w", err) + } + + return nil +} diff --git a/db-esdk-performance-testing/benchmarks/go/benchmark/testRunners.go b/db-esdk-performance-testing/benchmarks/go/benchmark/testRunners.go new file mode 100644 index 000000000..ea1dfd06d --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/go/benchmark/testRunners.go @@ -0,0 +1,352 @@ +package benchmark + +import ( + "fmt" + "log" + "runtime" + "runtime/metrics" + "sort" + "sync" + "time" + + "github.com/schollz/progressbar/v3" +) + +// === Test Orchestration === + +// runThroughputTests executes all throughput tests +func (b *DBESDKBenchmark) runThroughputTests(dataSizes []int, iterations int) { + log.Println("Running throughput tests...") + for _, dataSize := range dataSizes { + result, err := b.runThroughputTest(dataSize, iterations) + if err != nil { + log.Printf("Throughput test failed: %v", err) + continue + } + b.Results = append(b.Results, *result) + log.Printf("Throughput test completed: %.2f ops/sec", result.OpsPerSecond) + } +} + +// runMemoryTests executes all memory tests +func (b *DBESDKBenchmark) runMemoryTests(dataSizes []int) { + log.Println("Running memory tests...") + for _, dataSize := range dataSizes { + result, err := b.runMemoryTest(dataSize) + if err != nil { + log.Printf("Memory test failed: %v", err) + continue + } + b.Results = append(b.Results, *result) + log.Printf("Memory test completed: %.2f MB peak", result.PeakMemoryMB) + } +} + +// runConcurrencyTests executes all concurrency tests +func (b *DBESDKBenchmark) runConcurrencyTests(dataSizes []int, concurrencyLevels []int) { + log.Println("Running concurrency tests...") + for _, dataSize := range dataSizes { + for _, concurrency := range concurrencyLevels { + if concurrency > 1 { // Skip single-threaded + result, err := b.runConcurrentTest(dataSize, concurrency, 5) + if err != nil { + log.Printf("Concurrent test failed: %v", err) + continue + } + b.Results = append(b.Results, *result) + log.Printf("Concurrent test completed: %.2f ops/sec @ %d threads", result.OpsPerSecond, concurrency) + } + } + } +} + +// RunAllBenchmarks runs all configured benchmark tests +func (b *DBESDKBenchmark) RunAllBenchmarks() error { + log.Println("Starting comprehensive DB-ESDK benchmark suite") + + // Combine all data sizes + var dataSizes []int + for _, sizes := range [][]int{b.Config.DataSizes.Small, b.Config.DataSizes.Medium, b.Config.DataSizes.Large} { + dataSizes = append(dataSizes, sizes...) + } + + // Run test suites + if b.shouldRunTestType("throughput") { + b.runThroughputTests(dataSizes, b.Config.Iterations.Measurement) + } else { + log.Println("Skipping throughput tests (not in test_types)") + } + + if b.shouldRunTestType("memory") { + b.runMemoryTests(dataSizes) + } else { + log.Println("Skipping memory tests (not in test_types)") + } + + if b.shouldRunTestType("concurrency") { + b.runConcurrencyTests(dataSizes, b.Config.ConcurrencyLevels) + } else { + log.Println("Skipping concurrency tests (not in test_types)") + } + + log.Printf("Benchmark suite completed. Total results: %d", len(b.Results)) + return nil +} + +// === Memory Test Implementation === + +// runMemoryTest runs memory benchmark with continuous sampling +func (b *DBESDKBenchmark) runMemoryTest(dataSize int) (*BenchmarkResult, error) { + log.Printf("Running memory test - Size: %d bytes (%d iterations, continuous sampling)", dataSize, MemoryTestIterations) + + data := b.GenerateTestData(dataSize) + + // Setup runtime/metrics tracking + samples := make([]metrics.Sample, 2) + samples[0].Name = "/memory/classes/heap/objects:bytes" + samples[1].Name = "/gc/heap/allocs:bytes" + + var peakHeap, peakAllocations float64 + var avgHeapValues []float64 + + // Run iterations + for i := 0; i < MemoryTestIterations; i++ { + runtime.GC() + time.Sleep(GCSettleTimeMs * time.Millisecond) + + // Get baseline + metrics.Read(samples) + beforeHeap := samples[0].Value.Uint64() + beforeAllocs := samples[1].Value.Uint64() + + // Start continuous sampling + stopSampling := make(chan bool) + var continuousSamples []MemorySample + var samplingMutex sync.Mutex + + go func() { + sampledData := b.sampleMemoryContinuously(beforeHeap, beforeAllocs, stopSampling) + samplingMutex.Lock() + continuousSamples = sampledData + samplingMutex.Unlock() + }() + + // Run operation + operationStart := time.Now() + _, _, err := b.runBatchPutGetCycle(data) + operationDuration := time.Since(operationStart) + + close(stopSampling) + time.Sleep(FinalSampleWaitMs * time.Millisecond) + + if err != nil { + log.Printf("Iteration %d failed: %v", i+1, err) + continue + } + + // Analyze samples + samplingMutex.Lock() + var iterPeakHeap, iterTotalAllocs, iterAvgHeap float64 + if len(continuousSamples) > 0 { + var heapSum float64 + for _, s := range continuousSamples { + if s.HeapMB > iterPeakHeap { + iterPeakHeap = s.HeapMB + } + if s.MetricsAllocsMB > iterTotalAllocs { + iterTotalAllocs = s.MetricsAllocsMB + } + heapSum += s.HeapMB + } + iterAvgHeap = heapSum / float64(len(continuousSamples)) + } + samplingMutex.Unlock() + + // Update global metrics + if iterPeakHeap > peakHeap { + peakHeap = iterPeakHeap + } + if iterTotalAllocs > peakAllocations { + peakAllocations = iterTotalAllocs + } + avgHeapValues = append(avgHeapValues, iterAvgHeap) + + log.Printf("=== Iteration %d === Peak Heap: %.2f MB, Total Allocs: %.2f MB, Avg Heap: %.2f MB (%v, %d samples)", + i+1, iterPeakHeap, iterTotalAllocs, iterAvgHeap, operationDuration, len(continuousSamples)) + } + + if len(avgHeapValues) == 0 { + return nil, fmt.Errorf("all memory test iterations failed") + } + + overallAvgHeap := Average(avgHeapValues) + memoryEfficiency := float64(dataSize) / (overallAvgHeap * 1024 * 1024) + if overallAvgHeap == 0 { + memoryEfficiency = 0 + } + + log.Printf("\nMemory Summary:") + log.Printf("- Absolute Peak Heap: %.2f MB (across all runs)", peakHeap) + log.Printf("- Average Heap: %.2f MB (across all runs)", overallAvgHeap) + log.Printf("- Total Allocations: %.2f MB (max across all runs)", peakAllocations) + + result := &BenchmarkResult{ + TestName: "memory", + Language: "go", + DataSize: dataSize, + Concurrency: 1, + PeakMemoryMB: peakHeap, + MemoryEfficiency: memoryEfficiency, + Timestamp: time.Now().Format("2006-01-02 15:04:05"), + GoVersion: runtime.Version(), + CPUCount: b.CPUCount, + TotalMemoryGB: b.TotalMemoryGB, + } + + return result, nil +} + +// === Concurrent Test Implementation === + +// runConcurrentTest runs concurrent operations benchmark test +func (b *DBESDKBenchmark) runConcurrentTest(dataSize int, concurrency int, iterationsPerWorker int) (*BenchmarkResult, error) { + log.Printf("Running concurrent test - Size: %d bytes, Concurrency: %d", dataSize, concurrency) + + data := b.GenerateTestData(dataSize) + var allTimes []float64 + var timesMutex sync.Mutex + var wg sync.WaitGroup + + errorChan := make(chan error, concurrency) + startTime := time.Now() + + // Launch workers + for i := 0; i < concurrency; i++ { + wg.Add(1) + go func(workerID int) { + defer wg.Done() + + var workerTimes []float64 + for j := 0; j < iterationsPerWorker; j++ { + iterStart := time.Now() + _, _, err := b.runBatchPutGetCycle(data) + if err != nil { + errorChan <- fmt.Errorf("worker %d iteration %d failed: %w", workerID, j, err) + return + } + workerTimes = append(workerTimes, time.Since(iterStart).Seconds()*1000) + } + + timesMutex.Lock() + allTimes = append(allTimes, workerTimes...) + timesMutex.Unlock() + }(i) + } + + wg.Wait() + totalDuration := time.Since(startTime).Seconds() + + // Check for errors + select { + case err := <-errorChan: + return nil, err + default: + } + + // Calculate metrics + totalOps := concurrency * iterationsPerWorker + totalBytes := int64(totalOps * dataSize) + + sort.Float64s(allTimes) + result := &BenchmarkResult{ + TestName: "concurrent", + Language: "go", + DataSize: dataSize, + Concurrency: concurrency, + EndToEndLatencyMs: Average(allTimes), + OpsPerSecond: float64(totalOps) / totalDuration, + BytesPerSecond: float64(totalBytes) / totalDuration, + P50Latency: Percentile(allTimes, 0.50), + P95Latency: Percentile(allTimes, 0.95), + P99Latency: Percentile(allTimes, 0.99), + Timestamp: time.Now().Format("2006-01-02 15:04:05"), + GoVersion: runtime.Version(), + CPUCount: b.CPUCount, + TotalMemoryGB: b.TotalMemoryGB, + } + + log.Printf("Concurrent test completed - Ops/sec: %.2f, Avg latency: %.2f ms", + result.OpsPerSecond, result.EndToEndLatencyMs) + + return result, nil +} + +// === Throughput Test Implementation === + +// runThroughputTest runs throughput benchmark test +func (b *DBESDKBenchmark) runThroughputTest(dataSize int, iterations int) (*BenchmarkResult, error) { + log.Printf("Running throughput test - Size: %d bytes, Iterations: %d", dataSize, iterations) + + testData := b.GenerateTestData(dataSize) + + // Warmup + for i := 0; i < b.Config.Iterations.Warmup; i++ { + if _, _, err := b.runBatchPutGetCycle(testData); err != nil { + return nil, fmt.Errorf("warmup iteration %d failed: %w", i, err) + } + } + + // Measurement runs + var putLatencies, getLatencies, endToEndLatencies []float64 + var totalBytes int64 + + bar := progressbar.NewOptions(iterations, + progressbar.OptionSetDescription("Throughput test"), + progressbar.OptionShowCount(), + progressbar.OptionSetWidth(50), + ) + + startTime := time.Now() + for i := 0; i < iterations; i++ { + iterationStart := time.Now() + putMs, getMs, err := b.runBatchPutGetCycle(testData) + if err != nil { + return nil, fmt.Errorf("measurement iteration %d failed: %w", i, err) + } + iterationDuration := time.Since(iterationStart).Seconds() * 1000 + + putLatencies = append(putLatencies, putMs) + getLatencies = append(getLatencies, getMs) + endToEndLatencies = append(endToEndLatencies, iterationDuration) + totalBytes += int64(dataSize) + + bar.Add(1) + } + totalDuration := time.Since(startTime).Seconds() + + // Calculate metrics + sort.Float64s(endToEndLatencies) + result := &BenchmarkResult{ + TestName: "throughput", + Language: "go", + DataSize: dataSize, + Concurrency: 1, + PutLatencyMs: Average(putLatencies), + GetLatencyMs: Average(getLatencies), + EndToEndLatencyMs: Average(endToEndLatencies), + OpsPerSecond: float64(iterations) / totalDuration, + BytesPerSecond: float64(totalBytes) / totalDuration, + P50Latency: Percentile(endToEndLatencies, 0.50), + P95Latency: Percentile(endToEndLatencies, 0.95), + P99Latency: Percentile(endToEndLatencies, 0.99), + Timestamp: time.Now().Format("2006-01-02 15:04:05"), + GoVersion: runtime.Version(), + CPUCount: b.CPUCount, + TotalMemoryGB: b.TotalMemoryGB, + } + + log.Printf("Throughput test completed - Ops/sec: %.2f, MB/sec: %.2f", + result.OpsPerSecond, result.BytesPerSecond/(1024*1024)) + + return result, nil +} diff --git a/db-esdk-performance-testing/benchmarks/go/go.mod b/db-esdk-performance-testing/benchmarks/go/go.mod new file mode 100644 index 000000000..e521a2d68 --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/go/go.mod @@ -0,0 +1,50 @@ +module github.com/aws/aws-database-encryption-sdk-dynamodb/db-esdk-performance-testing/benchmarks/go + +go 1.23.2 + +toolchain go1.24.4 + +replace github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk => ../../../DynamoDbEncryption/runtimes/go/ImplementationFromDafny-go/ + +require ( + github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl v0.2.2 + github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk v0.0.0 + github.com/aws/aws-sdk-go-v2 v1.38.1 + github.com/aws/aws-sdk-go-v2/config v1.31.2 + github.com/aws/aws-sdk-go-v2/service/dynamodb v1.49.1 + github.com/aws/smithy-go v1.22.5 + github.com/schollz/progressbar/v3 v3.14.1 + github.com/shirou/gopsutil/v3 v3.23.12 + gopkg.in/yaml.v3 v3.0.1 +) + +require ( + github.com/aws/aws-cryptographic-material-providers-library/releases/go/dynamodb v0.2.2 // indirect + github.com/aws/aws-cryptographic-material-providers-library/releases/go/kms v0.2.2 // indirect + github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives v0.2.2 // indirect + github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library v0.2.2 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.18.6 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.4 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.4 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.4 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.4 // indirect + github.com/aws/aws-sdk-go-v2/service/kms v1.44.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.28.2 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.33.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.38.0 // indirect + github.com/dafny-lang/DafnyRuntimeGo/v4 v4.11.0 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/rivo/uniseg v0.4.4 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/yusufpapurcu/wmi v1.2.3 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.14.0 // indirect +) diff --git a/db-esdk-performance-testing/benchmarks/go/go.sum b/db-esdk-performance-testing/benchmarks/go/go.sum new file mode 100644 index 000000000..5c23c6894 --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/go/go.sum @@ -0,0 +1,103 @@ +github.com/aws/aws-cryptographic-material-providers-library/releases/go/dynamodb v0.2.2 h1:1CYvKblXRaPB9B0cdN/xWVOXvii2AQHgdcbTlI5F8Oc= +github.com/aws/aws-cryptographic-material-providers-library/releases/go/dynamodb v0.2.2/go.mod h1:vb/jlzf5XQSD5O3Po50VX6j6JyzcWs3wPoV7foewmJs= +github.com/aws/aws-cryptographic-material-providers-library/releases/go/kms v0.2.2 h1:0x9qTjQeW8fkP+/kuRw2drLDZM617rr8h6kcUetBjKE= +github.com/aws/aws-cryptographic-material-providers-library/releases/go/kms v0.2.2/go.mod h1:2wGHS+a/Dg21W3cnFDYbOu33d6eQUS52Ff/uAE2vIu8= +github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl v0.2.2 h1:gXYtIJfwt+5gOmo7zg/TDb0l1cz5XgnWR0/opB0OyyA= +github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl v0.2.2/go.mod h1:9yccmncslXtxhE4vyg1ZKaTWEe5xyNljrt3glFtMN4g= +github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives v0.2.2 h1:tBPXcmQVmf0ILx5eY++l64+yp04AFlHeKqpli0YDQBc= +github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives v0.2.2/go.mod h1:mSUejB7V5Wo23naCw2ORAJ+5ZJkyaSvB6hQbKPVXNuA= +github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library v0.2.2 h1:k/OqY+NJcTlFByY1WcM6dF5ZC4kIZtZ8b3A9kRVAj8Y= +github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library v0.2.2/go.mod h1:j4QF5oVY9L1yNZrzoDu3l3d8TRh53uBw3FLZCL7xCTk= +github.com/aws/aws-sdk-go-v2 v1.38.1 h1:j7sc33amE74Rz0M/PoCpsZQ6OunLqys/m5antM0J+Z8= +github.com/aws/aws-sdk-go-v2 v1.38.1/go.mod h1:9Q0OoGQoboYIAJyslFyF1f5K1Ryddop8gqMhWx/n4Wg= +github.com/aws/aws-sdk-go-v2/config v1.31.2 h1:NOaSZpVGEH2Np/c1toSeW0jooNl+9ALmsUTZ8YvkJR0= +github.com/aws/aws-sdk-go-v2/config v1.31.2/go.mod h1:17ft42Yb2lF6OigqSYiDAiUcX4RIkEMY6XxEMJsrAes= +github.com/aws/aws-sdk-go-v2/credentials v1.18.6 h1:AmmvNEYrru7sYNJnp3pf57lGbiarX4T9qU/6AZ9SucU= +github.com/aws/aws-sdk-go-v2/credentials v1.18.6/go.mod h1:/jdQkh1iVPa01xndfECInp1v1Wnp70v3K4MvtlLGVEc= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.4 h1:lpdMwTzmuDLkgW7086jE94HweHCqG+uOJwHf3LZs7T0= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.4/go.mod h1:9xzb8/SV62W6gHQGC/8rrvgNXU6ZoYM3sAIJCIrXJxY= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.4 h1:IdCLsiiIj5YJ3AFevsewURCPV+YWUlOW8JiPhoAy8vg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.4/go.mod h1:l4bdfCD7XyyZA9BolKBo1eLqgaJxl0/x91PL4Yqe0ao= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.4 h1:j7vjtr1YIssWQOMeOWRbh3z8g2oY/xPjnZH2gLY4sGw= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.4/go.mod h1:yDmJgqOiH4EA8Hndnv4KwAo8jCGTSnM5ASG1nBI+toA= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.49.1 h1:0RqS5X7EodJzOenoY4V3LUSp9PirELO2ZOpOZbMldco= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.49.1/go.mod h1:VRp/OeQolnQD9GfNgdSf3kU5vbg708PF6oPHh2bq3hc= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 h1:6+lZi2JeGKtCraAj1rpoZfKqnQ9SptseRZioejfUOLM= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0/go.mod h1:eb3gfbVIxIoGgJsi9pGne19dhCBpK6opTYpQqAmdy44= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.4 h1:upi++G3fQCAUBXQe58TbjXmdVPwrqMnRQMThOAIz7KM= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.4/go.mod h1:swb+GqWXTZMOyVV9rVePAUu5L80+X5a+Lui1RNOyUFo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.4 h1:ueB2Te0NacDMnaC+68za9jLwkjzxGWm0KB5HTUHjLTI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.4/go.mod h1:nLEfLnVMmLvyIG58/6gsSA03F1voKGaCfHV7+lR8S7s= +github.com/aws/aws-sdk-go-v2/service/kms v1.44.2 h1:yTtMSIGWk8KzPDX2pS9k7wNCPKiNWpiJ9DdB2mCAMzo= +github.com/aws/aws-sdk-go-v2/service/kms v1.44.2/go.mod h1:zgkQ8ige7qtxldA4cGtiXdbql3dBo4TfsP6uQyHwq0E= +github.com/aws/aws-sdk-go-v2/service/sso v1.28.2 h1:ve9dYBB8CfJGTFqcQ3ZLAAb/KXWgYlgu/2R2TZL2Ko0= +github.com/aws/aws-sdk-go-v2/service/sso v1.28.2/go.mod h1:n9bTZFZcBa9hGGqVz3i/a6+NG0zmZgtkB9qVVFDqPA8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.33.2 h1:pd9G9HQaM6UZAZh19pYOkpKSQkyQQ9ftnl/LttQOcGI= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.33.2/go.mod h1:eknndR9rU8UpE/OmFpqU78V1EcXPKFTTm5l/buZYgvM= +github.com/aws/aws-sdk-go-v2/service/sts v1.38.0 h1:iV1Ko4Em/lkJIsoKyGfc0nQySi+v0Udxr6Igq+y9JZc= +github.com/aws/aws-sdk-go-v2/service/sts v1.38.0/go.mod h1:bEPcjW7IbolPfK67G1nilqWyoxYMSPrDiIQ3RdIdKgo= +github.com/aws/smithy-go v1.22.5 h1:P9ATCXPMb2mPjYBgueqJNCA5S9UfktsW0tTxi+a7eqw= +github.com/aws/smithy-go v1.22.5/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= +github.com/dafny-lang/DafnyRuntimeGo/v4 v4.11.0 h1:wJhHuhD9thOc0GXojfW8DJ/n7G8prW+1nUL5O3lvzs0= +github.com/dafny-lang/DafnyRuntimeGo/v4 v4.11.0/go.mod h1:l2Tm4N2DKuq3ljONC2vOATeM9PUpXbIc8SgXdwwqEto= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= +github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= +github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/schollz/progressbar/v3 v3.14.1 h1:VD+MJPCr4s3wdhTc7OEJ/Z3dAeBzJ7yKH/P4lC5yRTI= +github.com/schollz/progressbar/v3 v3.14.1/go.mod h1:Zc9xXneTzWXF81TGoqL71u0sBPjULtEHYtj/WVgVy8E= +github.com/shirou/gopsutil/v3 v3.23.12 h1:z90NtUkp3bMtmICZKpC4+WaknU1eXtp5vtbQ11DgpE4= +github.com/shirou/gopsutil/v3 v3.23.12/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= +golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/db-esdk-performance-testing/benchmarks/go/main.go b/db-esdk-performance-testing/benchmarks/go/main.go new file mode 100644 index 000000000..74985ea9f --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/go/main.go @@ -0,0 +1,104 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "context" + "flag" + "fmt" + "log" + + "github.com/aws/aws-database-encryption-sdk-dynamodb/db-esdk-performance-testing/benchmarks/go/benchmark" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/service/dynamodb" + "github.com/aws/aws-sdk-go-v2/service/dynamodb/types" +) + +func main() { + // Parse command line arguments + configPath := flag.String("config", "../../config/test-scenarios.yaml", "Path to test configuration file") + outputPath := flag.String("output", "../../results/raw-data/go_results.json", "Path to output results file") + quick := flag.Bool("quick", false, "Run quick test with reduced iterations") + flag.Parse() + + // Initialize benchmark + bench, err := benchmark.New(*configPath) + if err != nil { + log.Fatalf("Failed to initialize benchmark: %v", err) + } + + // create dynamodb table + CreateTable(bench.DbesdkClient, bench.Config.TableName) + + // Adjust config for quick test + if *quick { + if bench.Config.QuickConfig == nil { + log.Fatalf("Quick mode requested but no quick_config found in config file") + } + bench.Config.Iterations.Measurement = bench.Config.QuickConfig.Iterations.Measurement + bench.Config.Iterations.Warmup = bench.Config.QuickConfig.Iterations.Warmup + bench.Config.DataSizes.Small = bench.Config.QuickConfig.DataSizes.Small + bench.Config.DataSizes.Medium = []int{} + bench.Config.DataSizes.Large = []int{} + bench.Config.ConcurrencyLevels = bench.Config.QuickConfig.ConcurrencyLevels + } + + // Run benchmarks + if err := bench.RunAllBenchmarks(); err != nil { + log.Fatalf("Benchmark failed: %v", err) + } + + // Save results + if err := bench.SaveResults(*outputPath); err != nil { + log.Fatalf("Failed to save results: %v", err) + } + + // Print summary + fmt.Printf("\n=== ESDK Go Benchmark Summary ===\n") + fmt.Printf("Total tests completed: %d\n", len(bench.Results)) + fmt.Printf("Results saved to: %s\n", *outputPath) + + if len(bench.Results) > 0 { + var maxThroughput float64 + for _, result := range bench.Results { + if result.TestName == "throughput" && result.OpsPerSecond > maxThroughput { + maxThroughput = result.OpsPerSecond + } + } + if maxThroughput > 0 { + fmt.Printf("Maximum throughput: %.2f ops/sec\n", maxThroughput) + } + } +} + +// Create DynamoDB table +func CreateTable(dynamodbClient *dynamodb.Client, tableName string) error { + input := &dynamodb.CreateTableInput{ + TableName: &tableName, + KeySchema: []types.KeySchemaElement{ + { + AttributeName: aws.String("partition_key"), + KeyType: types.KeyTypeHash, + }, + { + AttributeName: aws.String("sort_key"), + KeyType: types.KeyTypeRange, + }, + }, + AttributeDefinitions: []types.AttributeDefinition{ + { + AttributeName: aws.String("partition_key"), + AttributeType: types.ScalarAttributeTypeS, + }, + { + AttributeName: aws.String("sort_key"), + AttributeType: types.ScalarAttributeTypeN, + }, + }, + BillingMode: types.BillingModePayPerRequest, + } + + _, err := dynamodbClient.CreateTable(context.Background(), input) + return err +} diff --git a/db-esdk-performance-testing/benchmarks/java/README.md b/db-esdk-performance-testing/benchmarks/java/README.md new file mode 100644 index 000000000..71201edd6 --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/java/README.md @@ -0,0 +1,190 @@ +# DB-ESDK Performance Benchmark - Java + +This directory contains the Java implementation of the AWS Database Encryption SDK (DB-ESDK) performance benchmark suite. + +## Overview + +The Java benchmark provides comprehensive performance testing for the DB-ESDK Java runtime, measuring: + +- **Throughput**: Operations per second and bytes per second using DynamoDB batch operations +- **Latency**: Put, get, and end-to-end timing for encrypted DynamoDB operations +- **Memory Usage**: Peak memory consumption and efficiency +- **Concurrency**: Multi-threaded performance scaling +- **Statistical Analysis**: P50, P95, P99 latency percentiles + +## Prerequisites + +- Java 17 or higher +- Maven 3.6 or higher +- Local DynamoDB instance running on localhost:8000 +- Access to AWS Database Encryption SDK for DynamoDB Java libraries + +## Local DynamoDB Setup + +Start a local DynamoDB instance: + +```bash +# Using Docker +docker run -p 8000:8000 amazon/dynamodb-local + +# Or download and run DynamoDB Local +java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb -port 8000 +``` + +Create the test table: + +```bash +aws dynamodb create-table \ + --table-name db-esdk-performance-test \ + --attribute-definitions \ + AttributeName=partition_key,AttributeType=S \ + AttributeName=sort_key,AttributeType=N \ + --key-schema \ + AttributeName=partition_key,KeyType=HASH \ + AttributeName=sort_key,KeyType=RANGE \ + --billing-mode PAY_PER_REQUEST \ + --endpoint-url http://localhost:8000 +``` + +## Building + +```bash +# Build the project +mvn clean compile + +# Create executable JAR +mvn clean package + +# Run tests +mvn test +``` + +## Running Benchmarks + +### Quick Test + +```bash +# Using Maven +mvn exec:java -Dexec.mainClass="com.amazon.esdk.benchmark.Program" -Dexec.args="--quick" + +# Using JAR +java -jar target/esdk-benchmark.jar --quick +``` + +### Full Benchmark Suite + +```bash +# Using Maven +mvn exec:java -Dexec.mainClass="com.amazon.esdk.benchmark.Program" + +# Using JAR +java -jar target/esdk-benchmark.jar +``` + +### Custom Configuration + +```bash +# Specify custom config and output paths +java -jar target/esdk-benchmark.jar \ + --config /path/to/config.yaml \ + --output /path/to/results.json +``` + +## Command Line Options + +- `--config, -c`: Path to test configuration file (default: `../../config/test-scenarios.yaml`) +- `--output, -o`: Path to output results file (default: `../../results/raw-data/java_results.json`) +- `--quick, -q`: Run quick test with reduced iterations +- `--help, -h`: Show help message + +## Configuration + +The benchmark uses a YAML configuration file to define test parameters: + +```yaml +data_sizes: + small: [1024, 5120, 10240] + medium: [102400, 512000, 1048576] + large: [10485760, 52428800, 104857600] + +iterations: + warmup: 5 + measurement: 10 + +concurrency_levels: [1, 2, 4, 8] +``` + +## Output Format + +Results are saved in JSON format with the following structure: + +```json +{ + "metadata": { + "language": "java", + "timestamp": "2025-09-05T15:30:00Z", + "javaVersion": "17.0.2", + "cpuCount": 8, + "totalMemoryGB": 16.0, + "totalTests": 45 + }, + "results": [ + { + "test_name": "throughput", + "language": "java", + "data_size": 1024, + "concurrency": 1, + "put_latency_ms": 0.85, + "get_latency_ms": 0.72, + "end_to_end_latency_ms": 1.57, + "ops_per_second": 636.94, + "bytes_per_second": 652224.0, + "peak_memory_mb": 0.0, + "memory_efficiency_ratio": 0.0, + "p50_latency": 1.55, + "p95_latency": 1.89, + "p99_latency": 2.12, + "timestamp": "2025-09-05T15:30:15Z", + "java_version": "17.0.2", + "cpu_count": 8, + "total_memory_gb": 16.0 + } + ] +} +``` + +## Key Features + +### DB-ESDK Integration +- Uses AWS Database Encryption SDK for DynamoDB with transparent encryption +- Configures attribute actions (ENCRYPT_AND_SIGN, SIGN_ONLY, DO_NOTHING) +- Tests actual DynamoDB operations with client-side encryption +- Uses Raw AES keyring for consistent performance testing + +### Batch Operations +- Performs BatchWriteItem operations with 25 items per batch +- Measures BatchGetItem operations with consistent reads +- Tests realistic DynamoDB workloads with encryption overhead + +### Performance Metrics +- **Throughput Tests**: Measures ops/sec and bytes/sec for batch operations +- **Memory Tests**: Tracks peak memory usage during encrypted operations +- **Concurrency Tests**: Evaluates multi-threaded performance scaling +- **Latency Analysis**: P50, P95, P99 percentiles for operation timing + +## Dependencies + +Key dependencies used in this benchmark: + +- **AWS Database Encryption SDK for DynamoDB**: Core encryption functionality for DynamoDB +- **AWS Cryptographic Material Providers**: Keyring and cryptographic material management +- **AWS SDK for Java v2 DynamoDB**: DynamoDB client operations +- **Jackson**: JSON/YAML processing +- **Commons CLI**: Command line argument parsing +- **ProgressBar**: Visual progress indication +- **SLF4J**: Logging framework +- **JUnit**: Unit testing (test scope) + +## License + +This benchmark suite is part of the AWS Encryption SDK project and follows the same licensing terms. diff --git a/db-esdk-performance-testing/benchmarks/java/pom.xml b/db-esdk-performance-testing/benchmarks/java/pom.xml new file mode 100644 index 000000000..15634f36a --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/java/pom.xml @@ -0,0 +1,255 @@ + + + 4.0.0 + + com.amazon.esdk + esdk-performance-benchmark + 1.0.0 + jar + + ESDK Performance Benchmark - Java + Performance benchmarking suite for AWS Encryption SDK Java runtime + + + 17 + 17 + UTF-8 + + + 2.15.2 + 0.9.5 + 1.5.0 + 2.0.7 + 5.10.0 + + + + + + + software.amazon.awssdk + bom + 2.33.3 + pom + import + + + + + + + + software.amazon.cryptography + aws-database-encryption-sdk-dynamodb + 3.9.0 + + + + + software.amazon.cryptography + aws-cryptographic-material-providers + 1.11.0 + + + + + software.amazon.awssdk + dynamodb + + + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + ${jackson.version} + + + + + me.tongfei + progressbar + ${progressbar.version} + + + + + commons-cli + commons-cli + ${commons.cli.version} + + + + + org.slf4j + slf4j-api + ${slf4j.version} + + + + + org.junit.jupiter + junit-jupiter-engine + ${junit.version} + test + + + org.junit.jupiter + junit-jupiter-api + ${junit.version} + test + + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + com.example.Main + + -Xmx32g + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + 17 + 17 + UTF-8 + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.1.2 + + + **/*Test.java + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.5.0 + + + package + + shade + + + + + com.amazon.esdk.benchmark.Program + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + com.amazon.esdk.benchmark.Program + + + + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 3.3.1 + + + + + org.apache.maven.plugins + maven-resources-plugin + 3.3.1 + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + + + org.apache.maven.plugins + maven-install-plugin + 3.1.1 + + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.1 + + + + + com.diffplug.spotless + spotless-maven-plugin + 2.40.0 + + + + 1.17.0 + + + + + + + + + + + + + + central + Maven Central Repository + https://repo1.maven.org/maven2 + + + diff --git a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/ESDKBenchmark.java b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/ESDKBenchmark.java new file mode 100644 index 000000000..1ce6360c1 --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/ESDKBenchmark.java @@ -0,0 +1,347 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package com.amazon.esdk.benchmark; + +import com.amazon.esdk.benchmark.model.Config; +import com.amazon.esdk.benchmark.model.TestResult; +import java.lang.management.ManagementFactory; +import java.net.URI; +import java.nio.ByteBuffer; +import java.security.SecureRandom; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.crypto.KeyGenerator; +import javax.crypto.SecretKey; +import me.tongfei.progressbar.ProgressBar; +import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration; +import software.amazon.awssdk.core.SdkBytes; +import software.amazon.awssdk.services.dynamodb.DynamoDbClient; +import software.amazon.awssdk.services.dynamodb.model.AttributeDefinition; +import software.amazon.awssdk.services.dynamodb.model.AttributeValue; +import software.amazon.awssdk.services.dynamodb.model.BatchGetItemRequest; +import software.amazon.awssdk.services.dynamodb.model.BatchGetItemResponse; +import software.amazon.awssdk.services.dynamodb.model.BatchWriteItemRequest; +import software.amazon.awssdk.services.dynamodb.model.BatchWriteItemResponse; +import software.amazon.awssdk.services.dynamodb.model.BillingMode; +import software.amazon.awssdk.services.dynamodb.model.CreateTableRequest; +import software.amazon.awssdk.services.dynamodb.model.DescribeTableRequest; +import software.amazon.awssdk.services.dynamodb.model.KeySchemaElement; +import software.amazon.awssdk.services.dynamodb.model.KeyType; +import software.amazon.awssdk.services.dynamodb.model.KeysAndAttributes; +import software.amazon.awssdk.services.dynamodb.model.PutRequest; +import software.amazon.awssdk.services.dynamodb.model.ResourceNotFoundException; +import software.amazon.awssdk.services.dynamodb.model.ScalarAttributeType; +import software.amazon.awssdk.services.dynamodb.model.WriteRequest; +import software.amazon.cryptography.dbencryptionsdk.dynamodb.DynamoDbEncryptionInterceptor; +import software.amazon.cryptography.dbencryptionsdk.dynamodb.model.DynamoDbTableEncryptionConfig; +import software.amazon.cryptography.dbencryptionsdk.dynamodb.model.DynamoDbTablesEncryptionConfig; +import software.amazon.cryptography.dbencryptionsdk.structuredencryption.model.CryptoAction; +import software.amazon.cryptography.materialproviders.IKeyring; +import software.amazon.cryptography.materialproviders.MaterialProviders; +import software.amazon.cryptography.materialproviders.model.AesWrappingAlg; +import software.amazon.cryptography.materialproviders.model.CreateRawAesKeyringInput; +import software.amazon.cryptography.materialproviders.model.DBEAlgorithmSuiteId; +import software.amazon.cryptography.materialproviders.model.MaterialProvidersConfig; + +/** + * DB-ESDK Performance Benchmark Suite - Java Implementation + * + *

This class provides comprehensive performance testing for the AWS Database Encryption SDK (DB-ESDK) Java + * runtime, measuring throughput, latency, memory usage, and scalability using DynamoDB operations. + */ +public final class ESDKBenchmark { + + final Config config; + final DynamoDbClient ddbClient; + final IKeyring keyring; + final String tableName; + // System information + final int cpuCount; + final long totalMemoryMB; + + public ESDKBenchmark(final String configPath) throws Exception { + this.config = Config.loadConfig(configPath); + + // System info + this.cpuCount = Runtime.getRuntime().availableProcessors(); + this.totalMemoryMB = Runtime.getRuntime().maxMemory() / (1024 * 1024); + + // Table name for testing + this.tableName = "db-esdk-performance-test"; + + // Setup DB-ESDK with local DynamoDB + this.keyring = setupKeyring(); + this.ddbClient = setupDynamoDbClient(); + + // Create table if it doesn't exist + createTableIfNotExists(); + + System.out.println( + "Initialized DB-ESDK Benchmark - CPU cores: " + + cpuCount + + ", Memory: " + + (totalMemoryMB / 1024.0) + + "GB" + ); + } + + private IKeyring setupKeyring() throws Exception { + // Generate a 256-bit AES key for testing + final KeyGenerator aesGen = KeyGenerator.getInstance("AES"); + aesGen.init(256, new SecureRandom()); + final SecretKey encryptionKey = aesGen.generateKey(); + final ByteBuffer keyBytes = ByteBuffer.wrap(encryptionKey.getEncoded()); + + // Create Raw AES keyring using Material Providers + final String keyNamespace = "db-esdk-performance-test"; + final String keyName = "test-aes-256-key"; + + final CreateRawAesKeyringInput keyringInput = CreateRawAesKeyringInput + .builder() + .keyName(keyName) + .keyNamespace(keyNamespace) + .wrappingKey(keyBytes) + .wrappingAlg(AesWrappingAlg.ALG_AES256_GCM_IV12_TAG16) + .build(); + + final MaterialProviders matProv = MaterialProviders + .builder() + .MaterialProvidersConfig(MaterialProvidersConfig.builder().build()) + .build(); + + return matProv.CreateRawAesKeyring(keyringInput); + } + + private DynamoDbClient setupDynamoDbClient() { + // Configure attribute actions for encryption + final Map attributeActionsOnEncrypt = new HashMap<>(); + attributeActionsOnEncrypt.put("partition_key", CryptoAction.SIGN_ONLY); + attributeActionsOnEncrypt.put("sort_key", CryptoAction.SIGN_ONLY); + attributeActionsOnEncrypt.put("attribute1", CryptoAction.ENCRYPT_AND_SIGN); + attributeActionsOnEncrypt.put("attribute2", CryptoAction.SIGN_ONLY); + attributeActionsOnEncrypt.put(":attribute3", CryptoAction.DO_NOTHING); + + // Configure table encryption + final Map tableConfigs = new HashMap<>(); + final DynamoDbTableEncryptionConfig tableConfig = DynamoDbTableEncryptionConfig + .builder() + .logicalTableName(tableName) + .partitionKeyName("partition_key") + .sortKeyName("sort_key") + .attributeActionsOnEncrypt(attributeActionsOnEncrypt) + .keyring(keyring) + .allowedUnsignedAttributePrefix(":") + .algorithmSuiteId(DBEAlgorithmSuiteId.ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384) + .build(); + tableConfigs.put(tableName, tableConfig); + + // Create encryption interceptor + final DynamoDbEncryptionInterceptor encryptionInterceptor = DynamoDbEncryptionInterceptor + .builder() + .config( + DynamoDbTablesEncryptionConfig + .builder() + .tableEncryptionConfigs(tableConfigs) + .build() + ) + .build(); + + // Create DynamoDB client with local endpoint + return DynamoDbClient + .builder() + .endpointOverride(URI.create("http://localhost:8000")) + .overrideConfiguration( + ClientOverrideConfiguration + .builder() + .addExecutionInterceptor(encryptionInterceptor) + .build() + ) + .build(); + } + + private void createTableIfNotExists() { + try { + // Check if table exists + ddbClient.describeTable(DescribeTableRequest.builder() + .tableName(tableName) + .build()); + System.out.println("Table " + tableName + " already exists"); + } catch (ResourceNotFoundException e) { + // Table doesn't exist, create it + System.out.println("Creating table " + tableName + "..."); + ddbClient.createTable(CreateTableRequest.builder() + .tableName(tableName) + .keySchema( + KeySchemaElement.builder() + .attributeName("partition_key") + .keyType(KeyType.HASH) + .build(), + KeySchemaElement.builder() + .attributeName("sort_key") + .keyType(KeyType.RANGE) + .build() + ) + .attributeDefinitions( + AttributeDefinition.builder() + .attributeName("partition_key") + .attributeType(ScalarAttributeType.S) + .build(), + AttributeDefinition.builder() + .attributeName("sort_key") + .attributeType(ScalarAttributeType.N) + .build() + ) + .billingMode(BillingMode.PAY_PER_REQUEST) + .build()); + System.out.println("Table " + tableName + " created successfully"); + } + } + + /** + * Run a single batch put-get cycle and measure performance + */ + public BatchPutGetResult runBatchPutGetCycle(final byte[] data) { + // Create 25 items with same data, different sort_key + final List writeRequests = new ArrayList<>(); + final List> keys = new ArrayList<>(); + + for (int i = 0; i < 25; i++) { + final Map item = new HashMap<>(); + item.put("partition_key", AttributeValue.builder().s("benchmark-test").build()); + item.put("sort_key", AttributeValue.builder().n(String.valueOf(i)).build()); + item.put("attribute1", AttributeValue.builder() + .m(Map.of("data", AttributeValue.builder().b(SdkBytes.fromByteArray(data)).build())) + .build()); + item.put("attribute2", AttributeValue.builder().s("sign me!").build()); + item.put(":attribute3", AttributeValue.builder().s("ignore me!").build()); + + writeRequests.add(WriteRequest.builder() + .putRequest(PutRequest.builder().item(item).build()) + .build()); + + // Prepare key for batch get + final Map key = new HashMap<>(); + key.put("partition_key", AttributeValue.builder().s("benchmark-test").build()); + key.put("sort_key", AttributeValue.builder().n(String.valueOf(i)).build()); + keys.add(key); + } + + // Measure batch write + final long batchWriteStart = System.nanoTime(); + final BatchWriteItemResponse writeResponse = ddbClient.batchWriteItem( + BatchWriteItemRequest.builder() + .requestItems(Map.of(tableName, writeRequests)) + .build() + ); + final long batchWriteTime = System.nanoTime() - batchWriteStart; + + // Measure batch get + final long batchGetStart = System.nanoTime(); + final BatchGetItemResponse getResponse = ddbClient.batchGetItem( + BatchGetItemRequest.builder() + .requestItems(Map.of(tableName, KeysAndAttributes.builder() + .keys(keys) + .consistentRead(true) + .build())) + .build() + ); + final long batchGetTime = System.nanoTime() - batchGetStart; + + // Verify 25 items retrieved + final List> returnedItems = getResponse.responses().get(tableName); + if (returnedItems.size() != 25) { + throw new RuntimeException("Expected 25 items, got " + returnedItems.size()); + } + + // Verify data integrity for first item + final Map firstItem = returnedItems.get(0); + final AttributeValue attr1 = firstItem.get("attribute1"); + if (attr1 == null || attr1.m() == null || attr1.m().get("data") == null) { + throw new RuntimeException("Data verification failed"); + } + + return new BatchPutGetResult( + batchWriteTime / 1_000_000.0, // Convert to milliseconds + batchGetTime / 1_000_000.0 + ); + } + + public List runAllBenchmarks() { + System.out.println("Starting comprehensive DB-ESDK benchmark suite"); + final List allResults = new ArrayList<>(); + + // Get test parameters from config + final List dataSizes = new ArrayList<>(); + if (config.dataSizes.small != null) dataSizes.addAll( + config.dataSizes.small + ); + if (config.dataSizes.medium != null) dataSizes.addAll( + config.dataSizes.medium + ); + if (config.dataSizes.large != null) dataSizes.addAll( + config.dataSizes.large + ); + + // Calculate actual total tests + final int throughputTests = dataSizes.size(); + final int memoryTests = dataSizes.size(); + final int concurrentTests = + dataSizes.size() * + (int) config.concurrencyLevels.stream().filter(c -> c > 1).count(); + final int totalTests = throughputTests + memoryTests + concurrentTests; + + System.out.println("Running " + totalTests + " total tests"); + + try (ProgressBar pb = new ProgressBar("DB-ESDK Benchmark", totalTests)) { + // Run throughput tests + for (final Integer dataSize : dataSizes) { + final TestResult result = Tests.runThroughputTest( + this, + dataSize, + config.iterations.measurement + ); + allResults.add(result); + pb.step(); + } + + // Run memory tests + for (final Integer dataSize : dataSizes) { + final TestResult result = Tests.runMemoryTest(this, dataSize); + allResults.add(result); + pb.step(); + } + + // Run concurrency tests + for (final Integer dataSize : dataSizes) { + for (final Integer concurrency : config.concurrencyLevels) { + if (concurrency > 1) { + final TestResult result = Tests.runConcurrentTest( + this, + dataSize, + concurrency, + config.iterations.measurement + ); + allResults.add(result); + pb.step(); + } + } + } + } + + System.out.println("Benchmark suite completed successfully"); + return allResults; + } + + public static final class BatchPutGetResult { + public final double putLatencyMs; + public final double getLatencyMs; + + public BatchPutGetResult(final double putLatencyMs, final double getLatencyMs) { + this.putLatencyMs = putLatencyMs; + this.getLatencyMs = getLatencyMs; + } + } +} diff --git a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Program.java b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Program.java new file mode 100644 index 000000000..95767251b --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Program.java @@ -0,0 +1,122 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package com.amazon.esdk.benchmark; + +import com.amazon.esdk.benchmark.model.Report; +import com.amazon.esdk.benchmark.model.TestResult; +import java.util.List; +import java.util.OptionalDouble; + +public final class Program { + + public static void main(final String[] args) { + final CommandLineOptions options = parseArgs(args); + if (options == null) return; + + try { + final ESDKBenchmark benchmark = new ESDKBenchmark(options.configPath); + + if (options.quickTest) { + benchmark.config.adjustForQuickTest(); + } + + final List results = benchmark.runAllBenchmarks(); + Report.saveResults( + results, + options.outputPath, + benchmark.cpuCount, + benchmark.totalMemoryMB + ); + printSummary(results, options.outputPath); + } catch (final Exception ex) { + System.out.println("Benchmark failed: " + ex.getMessage()); + } + } + + private static CommandLineOptions parseArgs(final String[] args) { + // Default options + final CommandLineOptions options = new CommandLineOptions(); + options.configPath = "../config/test-scenarios.yaml"; + options.outputPath = "../../results/raw-data/java_results.json"; + options.quickTest = false; + + // Simple argument parsing + for (int i = 0; i < args.length; i++) { + switch (args[i]) { + case "--config": + case "-c": + if (i + 1 < args.length) options.configPath = args[++i]; + break; + case "--output": + case "-o": + if (i + 1 < args.length) options.outputPath = args[++i]; + break; + case "--quick": + case "-q": + options.quickTest = true; + break; + case "--help": + case "-h": + printUsage(); + return null; + } + } + + return options; + } + + private static void printUsage() { + System.out.println("ESDK Java Performance Benchmark"); + System.out.println("Usage: java -jar esdk-benchmark.jar [options]"); + System.out.println("Options:"); + System.out.println( + " --config, -c Path to test configuration file (default: ../../config/test-scenarios.yaml)" + ); + System.out.println( + " --output, -o Path to output results file (default: ../../results/raw-data/java_results.json)" + ); + System.out.println( + " --quick, -q Run quick test with reduced iterations" + ); + System.out.println(" --help, -h Show this help message"); + } + + private static void printSummary( + final List results, + final String outputPath + ) { + System.out.println("\n=== ESDK Java Benchmark Summary ==="); + System.out.println("Total tests completed: " + results.size()); + System.out.println("Results saved to: " + outputPath); + + // Print some basic statistics + if (!results.isEmpty()) { + final OptionalDouble avgOps = results + .stream() + .filter(r -> "throughput".equals(r.testName)) + .mapToDouble(r -> r.opsPerSecond) + .average(); + final OptionalDouble maxOps = results + .stream() + .filter(r -> "throughput".equals(r.testName)) + .mapToDouble(r -> r.opsPerSecond) + .max(); + + if (avgOps.isPresent() && maxOps.isPresent()) { + System.out.printf( + "Throughput - Avg: %.2f ops/sec, Max: %.2f ops/sec%n", + avgOps.getAsDouble(), + maxOps.getAsDouble() + ); + } + } + } + + public static final class CommandLineOptions { + + public String configPath; + public String outputPath; + public boolean quickTest; + } +} diff --git a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Tests.java b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Tests.java new file mode 100644 index 000000000..5be949238 --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Tests.java @@ -0,0 +1,228 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package com.amazon.esdk.benchmark; + +import com.amazon.esdk.benchmark.model.TestResult; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public final class Tests { + + private static final Logger logger = LoggerFactory.getLogger(Tests.class); + + // Constants for memory testing + private static final int MemoryTestIterations = 5; + private static final int SamplingIntervalMs = 1; + private static final int GcSettleTimeMs = 5; + + /** + * Run throughput benchmark test + */ + public static TestResult runThroughputTest( + final ESDKBenchmark benchmark, + final int dataSize, + final int iterations + ) { + System.out.println( + "Running throughput test - Size: " + + dataSize + + " bytes, Iterations: " + + iterations + ); + System.out.flush(); + + final byte[] data = new byte[dataSize]; + new java.security.SecureRandom().nextBytes(data); + + // Warmup + runWarmupIterations(benchmark, data, benchmark.config.iterations.warmup); + + // Measurement runs + final var results = runMeasurementIterations(benchmark, data, iterations); + + // Calculate statistics + final List putLatencies = new ArrayList<>(); + final List getLatencies = new ArrayList<>(); + final List totalLatencies = new ArrayList<>(); + + for (final var result : results) { + putLatencies.add(result.putLatencyMs); + getLatencies.add(result.getLatencyMs); + totalLatencies.add(result.putLatencyMs + result.getLatencyMs); + } + + return TestResult.createThroughputResult( + putLatencies, + getLatencies, + totalLatencies, + dataSize, + benchmark.cpuCount, + benchmark.totalMemoryMB + ); + } + + /** + * Run memory benchmark test + */ + public static TestResult runMemoryTest( + final ESDKBenchmark benchmark, + final int dataSize + ) { + System.out.println("Running memory test - Size: " + dataSize + " bytes"); + System.out.flush(); + + final byte[] data = new byte[dataSize]; + new java.security.SecureRandom().nextBytes(data); + + // Force GC before starting + System.gc(); + try { + Thread.sleep(GcSettleTimeMs); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + + final List memorySamples = new ArrayList<>(); + final Runtime runtime = Runtime.getRuntime(); + + // Baseline memory + final long baselineMemory = runtime.totalMemory() - runtime.freeMemory(); + + // Run memory test iterations + for (int i = 0; i < MemoryTestIterations; i++) { + final long beforeMemory = runtime.totalMemory() - runtime.freeMemory(); + + // Perform batch operation + benchmark.runBatchPutGetCycle(data); + + final long afterMemory = runtime.totalMemory() - runtime.freeMemory(); + final double memoryUsedMB = (afterMemory - baselineMemory) / (1024.0 * 1024.0); + memorySamples.add(Math.max(0, memoryUsedMB)); + + // Small delay between iterations + try { + Thread.sleep(SamplingIntervalMs); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + break; + } + } + + final double peakMemoryMb = memorySamples.stream() + .mapToDouble(Double::doubleValue) + .max() + .orElse(0.0); + + final double avgMemoryMb = memorySamples.stream() + .mapToDouble(Double::doubleValue) + .average() + .orElse(0.0); + + return TestResult.createMemoryResult( + peakMemoryMb, + avgMemoryMb, + dataSize, + benchmark.cpuCount, + benchmark.totalMemoryMB + ); + } + + /** + * Run concurrent benchmark test + */ + public static TestResult runConcurrentTest( + final ESDKBenchmark benchmark, + final int dataSize, + final int concurrency, + final int iterations + ) { + System.out.println( + "Running concurrent test - Size: " + + dataSize + + " bytes, Concurrency: " + + concurrency + + ", Iterations: " + + iterations + ); + System.out.flush(); + + final byte[] data = new byte[dataSize]; + new java.security.SecureRandom().nextBytes(data); + + final ExecutorService executor = Executors.newFixedThreadPool(concurrency); + final List>> futures = new ArrayList<>(); + + // Submit concurrent tasks + for (int i = 0; i < concurrency; i++) { + futures.add(executor.submit(() -> { + final List threadTimes = new ArrayList<>(); + for (int j = 0; j < iterations; j++) { + final long operationStart = System.nanoTime(); + benchmark.runBatchPutGetCycle(data); + final long operationTime = System.nanoTime() - operationStart; + threadTimes.add(operationTime / 1_000_000.0); // Convert to milliseconds + } + return threadTimes; + })); + } + + // Collect results + final List allTimes = new ArrayList<>(); + int totalOps = 0; + + try { + for (final Future> future : futures) { + final List threadTimes = future.get(); + allTimes.addAll(threadTimes); + totalOps += threadTimes.size(); + } + } catch (Exception e) { + throw new RuntimeException("Concurrent test failed", e); + } finally { + executor.shutdown(); + } + + return TestResult.createConcurrentResult( + allTimes, + totalOps, + dataSize, + concurrency, + benchmark.cpuCount, + benchmark.totalMemoryMB + ); + } + + private static void runWarmupIterations( + final ESDKBenchmark benchmark, + final byte[] data, + final int warmupIterations + ) { + System.out.println("Warming up with " + warmupIterations + " iterations..."); + for (int i = 0; i < warmupIterations; i++) { + benchmark.runBatchPutGetCycle(data); + } + System.out.println("Warmup completed"); + } + + private static List runMeasurementIterations( + final ESDKBenchmark benchmark, + final byte[] data, + final int iterations + ) { + System.out.println("Running " + iterations + " measurement iterations..."); + final List results = new ArrayList<>(); + + for (int i = 0; i < iterations; i++) { + final ESDKBenchmark.BatchPutGetResult result = benchmark.runBatchPutGetCycle(data); + results.add(result); + } + + return results; + } +} diff --git a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/BenchmarkMetadata.java b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/BenchmarkMetadata.java new file mode 100644 index 000000000..cd1af5ad1 --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/BenchmarkMetadata.java @@ -0,0 +1,24 @@ +package com.amazon.esdk.benchmark.model; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public final class BenchmarkMetadata { + + @JsonProperty("language") + public String language = "java"; + + @JsonProperty("timestamp") + public String timestamp = ""; + + @JsonProperty("java_version") + public String javaVersion = ""; + + @JsonProperty("cpu_count") + public int cpuCount; + + @JsonProperty("total_memory_gb") + public double totalMemoryGb; + + @JsonProperty("total_tests") + public int totalTests; +} diff --git a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/Config.java b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/Config.java new file mode 100644 index 000000000..05985bd05 --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/Config.java @@ -0,0 +1,99 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package com.amazon.esdk.benchmark.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public final class Config { + + private static final Logger logger = LoggerFactory.getLogger(Config.class); + + @JsonProperty("data_sizes") + public DataSizes dataSizes; + + @JsonProperty("iterations") + public Iterations iterations; + + @JsonProperty("concurrency_levels") + public List concurrencyLevels; + + @JsonProperty("quick_config") + public QuickConfig quickConfig; + + @JsonProperty("table_name") + public String tableName; + + @JsonProperty("keyring") + public String keyring; + + /** + * Load test configuration from YAML file + */ + public static Config loadConfig(String configPath) throws IOException { + ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); + File configFile = new File(configPath); + + if (!configFile.exists()) { + System.err.println("Config file not found, using default configuration"); + throw new FileNotFoundException(configPath); + } + + return mapper.readValue(configFile, Config.class); + } + + /** + * Adjust configuration for quick test + */ + public void adjustForQuickTest() { + this.iterations = quickConfig.iterations; + + this.dataSizes = quickConfig.dataSizes; + + this.concurrencyLevels = quickConfig.concurrencyLevels; + } + + public static final class DataSizes { + + @JsonProperty("small") + public List small; + + @JsonProperty("medium") + public List medium; + + @JsonProperty("large") + public List large; + } + + public static final class Iterations { + + @JsonProperty("warmup") + public int warmup; + + @JsonProperty("measurement") + public int measurement; + } + + public static final class QuickConfig { + + @JsonProperty("data_sizes") + public DataSizes dataSizes; + + @JsonProperty("iterations") + public Iterations iterations; + + @JsonProperty("concurrency_levels") + public List concurrencyLevels; + + @JsonProperty("test_types") + public List testTypes; + } +} diff --git a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/Report.java b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/Report.java new file mode 100644 index 000000000..8eeea4cc5 --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/Report.java @@ -0,0 +1,57 @@ +package com.amazon.esdk.benchmark.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public final class Report { + + private static final Logger logger = LoggerFactory.getLogger(Report.class); + + @JsonProperty("metadata") + public BenchmarkMetadata metadata; + + @JsonProperty("results") + public List results; + + public static void saveResults( + final List results, + final String outputPath, + final int cpuCount, + final double totalMemoryMB + ) throws IOException { + final Path outputFile = Paths.get(outputPath); + Files.createDirectories(outputFile.getParent()); + + final Report resultsData = new Report(); + + final BenchmarkMetadata metadata = new BenchmarkMetadata(); + metadata.language = "java"; + metadata.timestamp = + java.time.LocalDateTime + .now() + .format( + java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss") + ); + metadata.javaVersion = System.getProperty("java.version"); + metadata.cpuCount = cpuCount; + metadata.totalMemoryGb = totalMemoryMB / 1024.0; + metadata.totalTests = results.size(); + + resultsData.metadata = metadata; + resultsData.results = results; + + final ObjectMapper mapper = new ObjectMapper(); + mapper + .writerWithDefaultPrettyPrinter() + .writeValue(outputFile.toFile(), resultsData); + + System.out.println("Results saved to " + outputFile); + } +} From 36033526b3482553ca63c254c59825033c5924cf Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Fri, 5 Sep 2025 22:38:57 -0700 Subject: [PATCH 02/14] auto commit --- .../esdk/benchmark/model/TestResult.java | 190 ++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/TestResult.java diff --git a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/TestResult.java b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/TestResult.java new file mode 100644 index 000000000..b4e7c3772 --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/TestResult.java @@ -0,0 +1,190 @@ +package com.amazon.esdk.benchmark.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Collections; +import java.util.List; + +public final class TestResult { + + @JsonProperty("language") + public final String language = "java"; + + @JsonProperty("test_name") + public String testName; + + @JsonProperty("data_size") + public int dataSize; + + @JsonProperty("concurrency") + public int concurrency = 1; + + @JsonProperty("put_latency_ms") + public double putLatencyMs; + + @JsonProperty("get_latency_ms") + public double getLatencyMs; + + @JsonProperty("end_to_end_latency_ms") + public double endToEndLatencyMs; + + @JsonProperty("ops_per_second") + public double opsPerSecond; + + @JsonProperty("bytes_per_second") + public double bytesPerSecond; + + @JsonProperty("peak_memory_mb") + public double peakMemoryMb; + + @JsonProperty("memory_efficiency_ratio") + public double memoryEfficiencyRatio; + + @JsonProperty("p50_latency") + public double p50Latency; + + @JsonProperty("p95_latency") + public double p95Latency; + + @JsonProperty("p99_latency") + public double p99Latency; + + @JsonProperty("timestamp") + public String timestamp = ""; + + @JsonProperty("java_version") + public String javaVersion = ""; + + @JsonProperty("cpu_count") + public int cpuCount; + + @JsonProperty("total_memory_gb") + public double totalMemoryGb; + + @JsonProperty("iterations") + public int iterations; + + public static TestResult createThroughputResult( + final List putLatencies, + final List getLatencies, + final List totalLatencies, + final int dataSize, + final int cpuCount, + final double totalMemoryMB + ) { + final double avgTotalLatency = totalLatencies + .stream() + .mapToDouble(Double::doubleValue) + .average() + .orElse(0.0); + final double opsPerSecond = avgTotalLatency > 0 + ? 1000.0 / avgTotalLatency + : 0.0; + + Collections.sort(totalLatencies); + + final var result = new TestResult(); + result.testName = "throughput"; + result.dataSize = dataSize; + result.concurrency = 1; + result.opsPerSecond = opsPerSecond; + result.bytesPerSecond = opsPerSecond * dataSize; + result.endToEndLatencyMs = avgTotalLatency; + result.p50Latency = calculatePercentile(totalLatencies, 50); + result.p95Latency = calculatePercentile(totalLatencies, 95); + result.p99Latency = calculatePercentile(totalLatencies, 99); + result.putLatencyMs = putLatencies + .stream() + .mapToDouble(Double::doubleValue) + .average() + .orElse(0.0); + result.getLatencyMs = getLatencies + .stream() + .mapToDouble(Double::doubleValue) + .average() + .orElse(0.0); + result.iterations = putLatencies.size(); + result.timestamp = java.time.LocalDateTime + .now() + .format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + result.javaVersion = System.getProperty("java.version"); + result.cpuCount = cpuCount; + result.totalMemoryGb = totalMemoryMB / 1024.0; + + return result; + } + + public static TestResult createMemoryResult( + final double peakMemoryMb, + final double avgMemoryMb, + final int dataSize, + final int cpuCount, + final double totalMemoryMB + ) { + final double memoryEfficiency = peakMemoryMb > 0 + ? dataSize / (peakMemoryMb * 1024 * 1024) + : 0.0; + + final var result = new TestResult(); + result.testName = "memory"; + result.dataSize = dataSize; + result.concurrency = 1; + result.peakMemoryMb = peakMemoryMb; + result.memoryEfficiencyRatio = memoryEfficiency; + result.timestamp = java.time.LocalDateTime + .now() + .format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + result.javaVersion = System.getProperty("java.version"); + result.cpuCount = cpuCount; + result.totalMemoryGb = totalMemoryMB / 1024.0; + + return result; + } + + public static TestResult createConcurrentResult( + final List allTimes, + final int totalOps, + final int dataSize, + final int concurrency, + final int cpuCount, + final double totalMemoryMB + ) { + final double avgLatency = allTimes + .stream() + .mapToDouble(Double::doubleValue) + .average() + .orElse(0.0); + final double totalTimeSeconds = allTimes + .stream() + .mapToDouble(Double::doubleValue) + .sum() / 1000.0; + final double opsPerSecond = totalTimeSeconds > 0 ? totalOps / totalTimeSeconds : 0.0; + + final var result = new TestResult(); + result.testName = "concurrent"; + result.dataSize = dataSize; + result.concurrency = concurrency; + result.opsPerSecond = opsPerSecond; + result.bytesPerSecond = opsPerSecond * dataSize; + result.endToEndLatencyMs = avgLatency; + result.iterations = totalOps; + result.timestamp = java.time.LocalDateTime + .now() + .format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + result.javaVersion = System.getProperty("java.version"); + result.cpuCount = cpuCount; + result.totalMemoryGb = totalMemoryMB / 1024.0; + + return result; + } + + private static double calculatePercentile( + final List values, + final int percentile + ) { + if (values.isEmpty()) return 0.0; + + final int index = (int) Math.ceil((percentile / 100.0) * values.size()) - 1; + final int clampedIndex = Math.max(0, Math.min(index, values.size() - 1)); + return values.get(clampedIndex); + } +} From 5ff28342abfd41f448028f8dd5ed1107842e3df4 Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Fri, 5 Sep 2025 23:35:20 -0700 Subject: [PATCH 03/14] auto commit --- .../com/amazon/esdk/benchmark/ESDKBenchmark.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/ESDKBenchmark.java b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/ESDKBenchmark.java index 1ce6360c1..1d01e69bf 100644 --- a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/ESDKBenchmark.java +++ b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/ESDKBenchmark.java @@ -335,13 +335,8 @@ public List runAllBenchmarks() { return allResults; } - public static final class BatchPutGetResult { - public final double putLatencyMs; - public final double getLatencyMs; - - public BatchPutGetResult(final double putLatencyMs, final double getLatencyMs) { - this.putLatencyMs = putLatencyMs; - this.getLatencyMs = getLatencyMs; - } - } + public record BatchPutGetResult( + double putLatencyMs, + double getLatencyMs + ) {} } From 50fffe6c30784deb96b2f341d4cd60eea72b2e7e Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Fri, 5 Sep 2025 23:35:28 -0700 Subject: [PATCH 04/14] auto commit --- .../java/com/amazon/esdk/benchmark/Tests.java | 474 +++++++++++++----- 1 file changed, 355 insertions(+), 119 deletions(-) diff --git a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Tests.java b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Tests.java index 5be949238..d0e7b5a3e 100644 --- a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Tests.java +++ b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Tests.java @@ -5,10 +5,12 @@ import com.amazon.esdk.benchmark.model.TestResult; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; +import me.tongfei.progressbar.ProgressBar; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -20,10 +22,9 @@ public final class Tests { private static final int MemoryTestIterations = 5; private static final int SamplingIntervalMs = 1; private static final int GcSettleTimeMs = 5; + private static final int FinalSampleWaitMs = 2; - /** - * Run throughput benchmark test - */ + /** Run throughput benchmark test */ public static TestResult runThroughputTest( final ESDKBenchmark benchmark, final int dataSize, @@ -40,26 +41,27 @@ public static TestResult runThroughputTest( final byte[] data = new byte[dataSize]; new java.security.SecureRandom().nextBytes(data); - // Warmup - runWarmupIterations(benchmark, data, benchmark.config.iterations.warmup); + // Warmup - run measurement but drop results + runMeasurementIterations( + benchmark, + data, + benchmark.config.iterations.warmup + ); // Measurement runs final var results = runMeasurementIterations(benchmark, data, iterations); + final var encryptLatencies = results.encryptLatencies; + final var decryptLatencies = results.decryptLatencies; + final var totalLatencies = results.totalLatencies; - // Calculate statistics - final List putLatencies = new ArrayList<>(); - final List getLatencies = new ArrayList<>(); - final List totalLatencies = new ArrayList<>(); - - for (final var result : results) { - putLatencies.add(result.putLatencyMs); - getLatencies.add(result.getLatencyMs); - totalLatencies.add(result.putLatencyMs + result.getLatencyMs); + if (encryptLatencies.isEmpty()) { + System.out.println("All test iterations failed"); + return null; } return TestResult.createThroughputResult( - putLatencies, - getLatencies, + encryptLatencies, + decryptLatencies, totalLatencies, dataSize, benchmark.cpuCount, @@ -67,130 +69,381 @@ public static TestResult runThroughputTest( ); } - /** - * Run memory benchmark test - */ + private static long getTotalAllocatedBytes() { + final var threadBean = + java.lang.management.ManagementFactory.getThreadMXBean(); + final var sunThreadBean = (com.sun.management.ThreadMXBean) threadBean; + + if (!sunThreadBean.isThreadAllocatedMemoryEnabled()) { + sunThreadBean.setThreadAllocatedMemoryEnabled(true); + } + + return sunThreadBean.getCurrentThreadAllocatedBytes(); + } + + private static MeasurementResults runMeasurementIterations( + final ESDKBenchmark benchmark, + final byte[] data, + final int iterations + ) { + final var encryptLatencies = new ArrayList(); + final var decryptLatencies = new ArrayList(); + final var totalLatencies = new ArrayList(); + + for (int i = 0; i < iterations; i++) { + try { + final long iterationStart = System.nanoTime(); + final var result = benchmark.runBatchPutGetCycle(data); + final double totalMs = + (System.nanoTime() - iterationStart) / 1_000_000.0; + + encryptLatencies.add(result.putLatencyMs()); + decryptLatencies.add(result.getLatencyMs()); + totalLatencies.add(totalMs); + } catch (final Exception e) { + System.out.println("Iteration " + i + " failed: " + e.getMessage()); + } + } + + return new MeasurementResults( + encryptLatencies, + decryptLatencies, + totalLatencies + ); + } + + /** Run memory usage benchmark test */ public static TestResult runMemoryTest( final ESDKBenchmark benchmark, final int dataSize ) { - System.out.println("Running memory test - Size: " + dataSize + " bytes"); + System.out.println( + "Running memory test - Size: " + + dataSize + + " bytes (" + + MemoryTestIterations + + " iterations, continuous sampling)" + ); System.out.flush(); final byte[] data = new byte[dataSize]; new java.security.SecureRandom().nextBytes(data); + final var memoryResults = sampleMemoryDuringOperations(benchmark, data); + + if (memoryResults == null) { + throw new RuntimeException( + "Memory test failed: Unable to collect memory samples for data size " + + dataSize + + " bytes" + ); + } - // Force GC before starting + return TestResult.createMemoryResult( + memoryResults.peakMemoryMb, + memoryResults.avgMemoryMb, + dataSize, + benchmark.cpuCount, + benchmark.totalMemoryMB + ); + } + + private static MemoryResults sampleMemoryDuringOperations( + final ESDKBenchmark benchmark, + final byte[] data + ) { + double peakMemoryDelta = 0.0; + double peakAllocations = 0.0; + final var avgMemoryValues = new ArrayList(); + + for (int i = 0; i < MemoryTestIterations; i++) { + final var iterationResult = runSingleMemoryIteration( + benchmark, + data, + i + 1 + ); + + if (iterationResult.peakMemory > peakMemoryDelta) { + peakMemoryDelta = iterationResult.peakMemory; + } + if (iterationResult.totalAllocs > peakAllocations) { + peakAllocations = iterationResult.totalAllocs; + } + avgMemoryValues.add(iterationResult.avgMemory); + } + + final double overallAvgMemory = avgMemoryValues.isEmpty() + ? 0.0 + : avgMemoryValues + .stream() + .mapToDouble(Double::doubleValue) + .average() + .orElse(0.0); + + System.out.println("\nMemory Summary:"); + System.out.println( + "- Absolute Peak Heap: " + + String.format("%.2f", peakMemoryDelta) + + " MB (across all runs)" + ); + System.out.println( + "- Average Heap: " + + String.format("%.2f", overallAvgMemory) + + " MB (across all runs)" + ); + System.out.println( + "- Total Allocations: " + + String.format("%.2f", peakAllocations) + + " MB (max across all runs)" + ); + System.out.flush(); + + return new MemoryResults(peakMemoryDelta, overallAvgMemory); + } + + private static IterationResult runSingleMemoryIteration( + final ESDKBenchmark benchmark, + final byte[] data, + final int iteration + ) { + // Force GC and settle + System.gc(); System.gc(); try { Thread.sleep(GcSettleTimeMs); - } catch (InterruptedException e) { + } catch (final InterruptedException e) { Thread.currentThread().interrupt(); + throw new RuntimeException( + "Memory test interrupted during GC settle phase", + e + ); } - final List memorySamples = new ArrayList<>(); - final Runtime runtime = Runtime.getRuntime(); + final long baselineMemory = + Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); + final long baselineAllocations = getTotalAllocatedBytes(); + final var memorySamples = new ArrayList(); - // Baseline memory - final long baselineMemory = runtime.totalMemory() - runtime.freeMemory(); + final long operationStart = System.nanoTime(); - // Run memory test iterations - for (int i = 0; i < MemoryTestIterations; i++) { - final long beforeMemory = runtime.totalMemory() - runtime.freeMemory(); - - // Perform batch operation - benchmark.runBatchPutGetCycle(data); - - final long afterMemory = runtime.totalMemory() - runtime.freeMemory(); - final double memoryUsedMB = (afterMemory - baselineMemory) / (1024.0 * 1024.0); - memorySamples.add(Math.max(0, memoryUsedMB)); - - // Small delay between iterations + // Start background sampling + final var samplingTask = new Thread(() -> { try { - Thread.sleep(SamplingIntervalMs); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - break; - } + while (System.nanoTime() - operationStart < 100_000_000) { // 100ms + final long currentMemory = + Runtime.getRuntime().totalMemory() - + Runtime.getRuntime().freeMemory(); + final long currentAllocations = getTotalAllocatedBytes(); + final double heapDelta = + (currentMemory - baselineMemory) / (1024.0 * 1024.0); + final double cumulativeAllocs = + (currentAllocations - baselineAllocations) / (1024.0 * 1024.0); + + if (heapDelta > 0 || cumulativeAllocs > 0) { + synchronized (memorySamples) { + memorySamples.add( + new MemorySample( + Math.max(0, heapDelta), + Math.max(0, cumulativeAllocs) + ) + ); + } + } + Thread.sleep(SamplingIntervalMs); + } + } catch (final InterruptedException e) {} + }); + + samplingTask.start(); + + // Run the actual operation + try { + benchmark.runBatchPutGetCycle(data); + } catch (final Exception e) { + System.out.println( + "Memory test iteration " + iteration + " failed: " + e.getMessage() + ); + return new IterationResult(0.0, 0.0, 0.0); } - final double peakMemoryMb = memorySamples.stream() - .mapToDouble(Double::doubleValue) - .max() - .orElse(0.0); - - final double avgMemoryMb = memorySamples.stream() - .mapToDouble(Double::doubleValue) - .average() - .orElse(0.0); + final double operationDurationMs = + (System.nanoTime() - operationStart) / 1_000_000.0; - return TestResult.createMemoryResult( - peakMemoryMb, - avgMemoryMb, - dataSize, - benchmark.cpuCount, - benchmark.totalMemoryMB + // Wait for sampling to complete + try { + Thread.sleep(FinalSampleWaitMs); + samplingTask.join(100); + } catch (final InterruptedException e) {} + + return calculateIterationMetrics( + baselineMemory, + baselineAllocations, + memorySamples, + iteration, + operationDurationMs ); } - /** - * Run concurrent benchmark test - */ + private static IterationResult calculateIterationMetrics( + final long baselineMemory, + final long baselineAllocations, + final ArrayList memorySamples, + final int iteration, + final double operationDurationMs + ) { + final long finalMemory = + Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); + final long finalAllocations = getTotalAllocatedBytes(); + final double finalHeapDelta = + (finalMemory - baselineMemory) / (1024.0 * 1024.0); + final double finalCumulativeAllocs = + (finalAllocations - baselineAllocations) / (1024.0 * 1024.0); + + final double iterPeakMemory; + final double iterTotalAllocs; + final double iterAvgMemory; + + synchronized (memorySamples) { + if (memorySamples.isEmpty()) { + iterPeakMemory = Math.max(0, finalHeapDelta); + iterTotalAllocs = Math.max(0, finalCumulativeAllocs); + iterAvgMemory = Math.max(0, finalHeapDelta); + } else { + iterPeakMemory = + memorySamples.stream().mapToDouble(s -> s.heapMB).max().orElse(0.0); + iterTotalAllocs = Math.max(0, finalCumulativeAllocs); + iterAvgMemory = + memorySamples + .stream() + .mapToDouble(s -> s.heapMB) + .average() + .orElse(0.0); + } + } + + System.out.println( + "=== Iteration " + + iteration + + " === Peak Heap: " + + String.format("%.2f", iterPeakMemory) + + " MB, Total Allocs: " + + String.format("%.2f", iterTotalAllocs) + + " MB, Avg Heap: " + + String.format("%.2f", iterAvgMemory) + + " MB (" + + String.format("%.0f", operationDurationMs) + + "ms, " + + memorySamples.size() + + " samples)" + ); + System.out.flush(); + + return new IterationResult(iterPeakMemory, iterTotalAllocs, iterAvgMemory); + } + + private record IterationResult( + double peakMemory, + double totalAllocs, + double avgMemory + ) {} + + /** Run concurrent operations benchmark test */ public static TestResult runConcurrentTest( final ESDKBenchmark benchmark, final int dataSize, final int concurrency, - final int iterations + final int iterationsPerThread ) { System.out.println( "Running concurrent test - Size: " + dataSize + " bytes, Concurrency: " + concurrency + - ", Iterations: " + - iterations + ", Iterations per thread: " + + iterationsPerThread ); System.out.flush(); + if (concurrency <= 0) { + throw new IllegalArgumentException( + "Concurrency must be positive, got: " + concurrency + ); + } + if (iterationsPerThread <= 0) { + throw new IllegalArgumentException( + "Iterations per thread must be positive, got: " + iterationsPerThread + ); + } + final byte[] data = new byte[dataSize]; new java.security.SecureRandom().nextBytes(data); + final List allTimes = Collections.synchronizedList( + new ArrayList<>() + ); final ExecutorService executor = Executors.newFixedThreadPool(concurrency); - final List>> futures = new ArrayList<>(); - - // Submit concurrent tasks - for (int i = 0; i < concurrency; i++) { - futures.add(executor.submit(() -> { - final List threadTimes = new ArrayList<>(); - for (int j = 0; j < iterations; j++) { - final long operationStart = System.nanoTime(); - benchmark.runBatchPutGetCycle(data); - final long operationTime = System.nanoTime() - operationStart; - threadTimes.add(operationTime / 1_000_000.0); // Convert to milliseconds + final List> futures = new ArrayList<>(); + + // Create progress bar for concurrent operations + final int expectedOperations = concurrency * iterationsPerThread; + try ( + final ProgressBar concurrentPb = new ProgressBar( + "Concurrent test", + expectedOperations + ) + ) { + // Submit concurrent tasks + for (int i = 0; i < concurrency; i++) { + final Future future = executor.submit(() -> { + for (int j = 0; j < iterationsPerThread; j++) { + try { + final long threadStartTime = System.nanoTime(); + benchmark.runBatchPutGetCycle(data); + final double elapsed = + (System.nanoTime() - threadStartTime) / 1_000_000.0; + allTimes.add(elapsed); + + System.out.flush(); + concurrentPb.step(); + System.out.flush(); + } catch (final Exception e) { + System.err.println( + "Concurrent test iteration failed: " + e.getMessage() + ); + } + } + return null; + }); + futures.add(future); + } + + // Wait for all tasks to complete + for (final Future future : futures) { + try { + future.get(); + } catch (final Exception e) { + System.err.println("Concurrent thread failed: " + e.getMessage()); } - return threadTimes; - })); + } } - // Collect results - final List allTimes = new ArrayList<>(); - int totalOps = 0; - - try { - for (final Future> future : futures) { - final List threadTimes = future.get(); - allTimes.addAll(threadTimes); - totalOps += threadTimes.size(); - } - } catch (Exception e) { - throw new RuntimeException("Concurrent test failed", e); - } finally { - executor.shutdown(); + executor.shutdown(); + + if (allTimes.isEmpty()) { + throw new RuntimeException( + "Concurrent test failed: No operations completed successfully. " + + "Concurrency: " + + concurrency + + ", Expected operations: " + + (concurrency * iterationsPerThread) + ); } + // Calculate metrics + final int totalOperations = allTimes.size(); + return TestResult.createConcurrentResult( allTimes, - totalOps, + totalOperations, dataSize, concurrency, benchmark.cpuCount, @@ -198,31 +451,14 @@ public static TestResult runConcurrentTest( ); } - private static void runWarmupIterations( - final ESDKBenchmark benchmark, - final byte[] data, - final int warmupIterations - ) { - System.out.println("Warming up with " + warmupIterations + " iterations..."); - for (int i = 0; i < warmupIterations; i++) { - benchmark.runBatchPutGetCycle(data); - } - System.out.println("Warmup completed"); - } + // Helper records + private record MeasurementResults( + List encryptLatencies, + List decryptLatencies, + List totalLatencies + ) {} - private static List runMeasurementIterations( - final ESDKBenchmark benchmark, - final byte[] data, - final int iterations - ) { - System.out.println("Running " + iterations + " measurement iterations..."); - final List results = new ArrayList<>(); - - for (int i = 0; i < iterations; i++) { - final ESDKBenchmark.BatchPutGetResult result = benchmark.runBatchPutGetCycle(data); - results.add(result); - } - - return results; - } -} + private record MemoryResults(double peakMemoryMb, double avgMemoryMb) {} + + private record MemorySample(double heapMB, double allocsMB) {} +} \ No newline at end of file From 9a7d2a897407db92f4f4ff73a6305862b3c02a9a Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Sat, 6 Sep 2025 14:30:10 -0700 Subject: [PATCH 05/14] item encryptor --- .../benchmarks/config/test-scenarios.yaml | 7 +- .../amazon/esdk/benchmark/ESDKBenchmark.java | 151 +-- .../results/raw-data/java_results.json | 1091 +++++++++++++++++ 3 files changed, 1131 insertions(+), 118 deletions(-) create mode 100644 db-esdk-performance-testing/results/raw-data/java_results.json diff --git a/db-esdk-performance-testing/benchmarks/config/test-scenarios.yaml b/db-esdk-performance-testing/benchmarks/config/test-scenarios.yaml index 394dfb3eb..1fe002ba2 100644 --- a/db-esdk-performance-testing/benchmarks/config/test-scenarios.yaml +++ b/db-esdk-performance-testing/benchmarks/config/test-scenarios.yaml @@ -9,7 +9,12 @@ data_sizes: - 10240 # 10KB medium: - 102400 # 100KB - - 400000 # 400KB + - 512000 # 500KB + - 1048576 # 1MB + large: + - 10485760 # 10MB + - 52428800 # 50MB + - 104857600 # 100MB # Quick test configuration (reduced test set for faster execution) quick_config: diff --git a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/ESDKBenchmark.java b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/ESDKBenchmark.java index 1d01e69bf..e68f4cb8c 100644 --- a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/ESDKBenchmark.java +++ b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/ESDKBenchmark.java @@ -36,6 +36,10 @@ import software.amazon.awssdk.services.dynamodb.model.ScalarAttributeType; import software.amazon.awssdk.services.dynamodb.model.WriteRequest; import software.amazon.cryptography.dbencryptionsdk.dynamodb.DynamoDbEncryptionInterceptor; +import software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.DynamoDbItemEncryptor; +import software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.model.DecryptItemInput; +import software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.model.DynamoDbItemEncryptorConfig; +import software.amazon.cryptography.dbencryptionsdk.dynamodb.itemencryptor.model.EncryptItemInput; import software.amazon.cryptography.dbencryptionsdk.dynamodb.model.DynamoDbTableEncryptionConfig; import software.amazon.cryptography.dbencryptionsdk.dynamodb.model.DynamoDbTablesEncryptionConfig; import software.amazon.cryptography.dbencryptionsdk.structuredencryption.model.CryptoAction; @@ -55,7 +59,7 @@ public final class ESDKBenchmark { final Config config; - final DynamoDbClient ddbClient; + final DynamoDbItemEncryptor itemEncryptor; final IKeyring keyring; final String tableName; // System information @@ -74,10 +78,10 @@ public ESDKBenchmark(final String configPath) throws Exception { // Setup DB-ESDK with local DynamoDB this.keyring = setupKeyring(); - this.ddbClient = setupDynamoDbClient(); + this.itemEncryptor = setupItemEncryptorClient(); // Create table if it doesn't exist - createTableIfNotExists(); + // createTableIfNotExists(); System.out.println( "Initialized DB-ESDK Benchmark - CPU cores: " + @@ -115,7 +119,7 @@ private IKeyring setupKeyring() throws Exception { return matProv.CreateRawAesKeyring(keyringInput); } - private DynamoDbClient setupDynamoDbClient() { + private DynamoDbItemEncryptor setupItemEncryptorClient() { // Configure attribute actions for encryption final Map attributeActionsOnEncrypt = new HashMap<>(); attributeActionsOnEncrypt.put("partition_key", CryptoAction.SIGN_ONLY); @@ -125,8 +129,7 @@ private DynamoDbClient setupDynamoDbClient() { attributeActionsOnEncrypt.put(":attribute3", CryptoAction.DO_NOTHING); // Configure table encryption - final Map tableConfigs = new HashMap<>(); - final DynamoDbTableEncryptionConfig tableConfig = DynamoDbTableEncryptionConfig + final DynamoDbItemEncryptorConfig tableConfig = DynamoDbItemEncryptorConfig .builder() .logicalTableName(tableName) .partitionKeyName("partition_key") @@ -136,136 +139,50 @@ private DynamoDbClient setupDynamoDbClient() { .allowedUnsignedAttributePrefix(":") .algorithmSuiteId(DBEAlgorithmSuiteId.ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384_SYMSIG_HMAC_SHA384) .build(); - tableConfigs.put(tableName, tableConfig); - // Create encryption interceptor - final DynamoDbEncryptionInterceptor encryptionInterceptor = DynamoDbEncryptionInterceptor + final DynamoDbItemEncryptor itemEncryptor = DynamoDbItemEncryptor .builder() - .config( - DynamoDbTablesEncryptionConfig - .builder() - .tableEncryptionConfigs(tableConfigs) - .build() - ) - .build(); - - // Create DynamoDB client with local endpoint - return DynamoDbClient - .builder() - .endpointOverride(URI.create("http://localhost:8000")) - .overrideConfiguration( - ClientOverrideConfiguration - .builder() - .addExecutionInterceptor(encryptionInterceptor) - .build() - ) + .DynamoDbItemEncryptorConfig(tableConfig) .build(); - } - - private void createTableIfNotExists() { - try { - // Check if table exists - ddbClient.describeTable(DescribeTableRequest.builder() - .tableName(tableName) - .build()); - System.out.println("Table " + tableName + " already exists"); - } catch (ResourceNotFoundException e) { - // Table doesn't exist, create it - System.out.println("Creating table " + tableName + "..."); - ddbClient.createTable(CreateTableRequest.builder() - .tableName(tableName) - .keySchema( - KeySchemaElement.builder() - .attributeName("partition_key") - .keyType(KeyType.HASH) - .build(), - KeySchemaElement.builder() - .attributeName("sort_key") - .keyType(KeyType.RANGE) - .build() - ) - .attributeDefinitions( - AttributeDefinition.builder() - .attributeName("partition_key") - .attributeType(ScalarAttributeType.S) - .build(), - AttributeDefinition.builder() - .attributeName("sort_key") - .attributeType(ScalarAttributeType.N) - .build() - ) - .billingMode(BillingMode.PAY_PER_REQUEST) - .build()); - System.out.println("Table " + tableName + " created successfully"); - } + + return itemEncryptor; } /** * Run a single batch put-get cycle and measure performance */ - public BatchPutGetResult runBatchPutGetCycle(final byte[] data) { + public Result runBatchPutGetCycle(final byte[] data) { // Create 25 items with same data, different sort_key - final List writeRequests = new ArrayList<>(); - final List> keys = new ArrayList<>(); - - for (int i = 0; i < 25; i++) { - final Map item = new HashMap<>(); + final Map item = new HashMap<>(); item.put("partition_key", AttributeValue.builder().s("benchmark-test").build()); - item.put("sort_key", AttributeValue.builder().n(String.valueOf(i)).build()); + item.put("sort_key", AttributeValue.builder().n(String.valueOf(0)).build()); item.put("attribute1", AttributeValue.builder() .m(Map.of("data", AttributeValue.builder().b(SdkBytes.fromByteArray(data)).build())) .build()); item.put("attribute2", AttributeValue.builder().s("sign me!").build()); item.put(":attribute3", AttributeValue.builder().s("ignore me!").build()); - writeRequests.add(WriteRequest.builder() - .putRequest(PutRequest.builder().item(item).build()) - .build()); - - // Prepare key for batch get - final Map key = new HashMap<>(); - key.put("partition_key", AttributeValue.builder().s("benchmark-test").build()); - key.put("sort_key", AttributeValue.builder().n(String.valueOf(i)).build()); - keys.add(key); - } - // Measure batch write - final long batchWriteStart = System.nanoTime(); - final BatchWriteItemResponse writeResponse = ddbClient.batchWriteItem( - BatchWriteItemRequest.builder() - .requestItems(Map.of(tableName, writeRequests)) - .build() - ); - final long batchWriteTime = System.nanoTime() - batchWriteStart; + final long encryptStart = System.nanoTime(); + final Map encryptedItem = itemEncryptor + .EncryptItem( + EncryptItemInput.builder().plaintextItem(item).build() + ) + .encryptedItem(); + final long encryptTime = System.nanoTime() - encryptStart; // Measure batch get - final long batchGetStart = System.nanoTime(); - final BatchGetItemResponse getResponse = ddbClient.batchGetItem( - BatchGetItemRequest.builder() - .requestItems(Map.of(tableName, KeysAndAttributes.builder() - .keys(keys) - .consistentRead(true) - .build())) - .build() - ); - final long batchGetTime = System.nanoTime() - batchGetStart; - - // Verify 25 items retrieved - final List> returnedItems = getResponse.responses().get(tableName); - if (returnedItems.size() != 25) { - throw new RuntimeException("Expected 25 items, got " + returnedItems.size()); - } - - // Verify data integrity for first item - final Map firstItem = returnedItems.get(0); - final AttributeValue attr1 = firstItem.get("attribute1"); - if (attr1 == null || attr1.m() == null || attr1.m().get("data") == null) { - throw new RuntimeException("Data verification failed"); - } + final long decryptStart = System.nanoTime(); + final Map decryptedItem = itemEncryptor + .DecryptItem( + DecryptItemInput.builder().encryptedItem(encryptedItem).build() + ) + .plaintextItem(); + final long decryptTime = System.nanoTime() - decryptStart; - return new BatchPutGetResult( - batchWriteTime / 1_000_000.0, // Convert to milliseconds - batchGetTime / 1_000_000.0 + return new Result( + encryptTime / 1_000_000.0, // Convert to milliseconds + decryptTime / 1_000_000.0 ); } @@ -335,7 +252,7 @@ public List runAllBenchmarks() { return allResults; } - public record BatchPutGetResult( + public record Result( double putLatencyMs, double getLatencyMs ) {} diff --git a/db-esdk-performance-testing/results/raw-data/java_results.json b/db-esdk-performance-testing/results/raw-data/java_results.json new file mode 100644 index 000000000..ae8fe8ff8 --- /dev/null +++ b/db-esdk-performance-testing/results/raw-data/java_results.json @@ -0,0 +1,1091 @@ +{ + "metadata" : { + "language" : "java", + "timestamp" : "2025-09-06 14:28:23", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "total_tests" : 54 + }, + "results" : [ { + "language" : "java", + "test_name" : "throughput", + "data_size" : 1024, + "concurrency" : 1, + "put_latency_ms" : 4.3030332, + "get_latency_ms" : 4.0238707, + "end_to_end_latency_ms" : 8.343074900000001, + "ops_per_second" : 119.85988523248183, + "bytes_per_second" : 122736.5224780614, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 7.72825, + "p95_latency" : 13.743709, + "p99_latency" : 13.743709, + "timestamp" : "2025-09-06 14:14:58", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 5120, + "concurrency" : 1, + "put_latency_ms" : 3.4424249000000002, + "get_latency_ms" : 3.5804, + "end_to_end_latency_ms" : 7.0348749, + "ops_per_second" : 142.1489385689005, + "bytes_per_second" : 727802.5654727705, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 6.920958, + "p95_latency" : 7.73725, + "p99_latency" : 7.73725, + "timestamp" : "2025-09-06 14:14:58", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 10240, + "concurrency" : 1, + "put_latency_ms" : 3.3743459000000002, + "get_latency_ms" : 3.3997248, + "end_to_end_latency_ms" : 6.7859666, + "ops_per_second" : 147.362941633105, + "bytes_per_second" : 1508996.5223229954, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 6.566875, + "p95_latency" : 7.526041, + "p99_latency" : 7.526041, + "timestamp" : "2025-09-06 14:14:58", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 102400, + "concurrency" : 1, + "put_latency_ms" : 6.691, + "get_latency_ms" : 5.7249624, + "end_to_end_latency_ms" : 12.438887699999999, + "ops_per_second" : 80.39304028767782, + "bytes_per_second" : 8232247.325458209, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 12.451542, + "p95_latency" : 12.8575, + "p99_latency" : 12.8575, + "timestamp" : "2025-09-06 14:14:58", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 512000, + "concurrency" : 1, + "put_latency_ms" : 21.4278084, + "get_latency_ms" : 17.0769582, + "end_to_end_latency_ms" : 38.554225200000005, + "ops_per_second" : 25.93749439425902, + "bytes_per_second" : 1.3279997129860617E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 38.0565, + "p95_latency" : 40.1145, + "p99_latency" : 40.1145, + "timestamp" : "2025-09-06 14:14:59", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 1048576, + "concurrency" : 1, + "put_latency_ms" : 40.0691791, + "get_latency_ms" : 31.680779100000002, + "end_to_end_latency_ms" : 71.81263340000001, + "ops_per_second" : 13.925126438825176, + "bytes_per_second" : 1.4601553380717548E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 71.495, + "p95_latency" : 75.117375, + "p99_latency" : 75.117375, + "timestamp" : "2025-09-06 14:15:00", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 10485760, + "concurrency" : 1, + "put_latency_ms" : 374.3888584, + "get_latency_ms" : 290.6276292, + "end_to_end_latency_ms" : 665.4637918000001, + "ops_per_second" : 1.5027113605912643, + "bytes_per_second" : 1.5757070676433455E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 664.668208, + "p95_latency" : 672.386959, + "p99_latency" : 672.386959, + "timestamp" : "2025-09-06 14:15:10", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 52428800, + "concurrency" : 1, + "put_latency_ms" : 1890.1900877, + "get_latency_ms" : 1467.8890084, + "end_to_end_latency_ms" : 3359.5464125, + "ops_per_second" : 0.29765923050780296, + "bytes_per_second" : 1.5605916264447499E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 3357.359708, + "p95_latency" : 3421.457041, + "p99_latency" : 3421.457041, + "timestamp" : "2025-09-06 14:16:01", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 104857600, + "concurrency" : 1, + "put_latency_ms" : 3719.7835250999997, + "get_latency_ms" : 2883.4108541, + "end_to_end_latency_ms" : 6606.1604375, + "ops_per_second" : 0.15137385921230134, + "bytes_per_second" : 1.5872699579739809E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 6560.141583, + "p95_latency" : 6773.037709, + "p99_latency" : 6773.037709, + "timestamp" : "2025-09-06 14:17:42", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 1024, + "concurrency" : 1, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 0.0, + "ops_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 3.2283248901367188, + "memory_efficiency_ratio" : 3.024982098250473E-4, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:17:43", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 5120, + "concurrency" : 1, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 0.0, + "ops_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 3.9408340454101562, + "memory_efficiency_ratio" : 0.0012390302265295732, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:17:44", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 10240, + "concurrency" : 1, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 0.0, + "ops_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 3.3275222778320312, + "memory_efficiency_ratio" : 0.0029348037923167753, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:17:44", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 102400, + "concurrency" : 1, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 0.0, + "ops_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 6.683906555175781, + "memory_efficiency_ratio" : 0.014610654591569424, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:17:45", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 512000, + "concurrency" : 1, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 0.0, + "ops_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 15.356155395507812, + "memory_efficiency_ratio" : 0.03179710268774947, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:17:46", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 1048576, + "concurrency" : 1, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 0.0, + "ops_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 36.000083923339844, + "memory_efficiency_ratio" : 0.027777713022265275, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:17:47", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 10485760, + "concurrency" : 1, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 0.0, + "ops_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 54.13105010986328, + "memory_efficiency_ratio" : 0.184736855828664, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:17:50", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 52428800, + "concurrency" : 1, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 0.0, + "ops_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 211.9617462158203, + "memory_efficiency_ratio" : 0.2358916214489467, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:08", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 104857600, + "concurrency" : 1, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 0.0, + "ops_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 420.0141296386719, + "memory_efficiency_ratio" : 0.23808722836545432, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:44", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1024, + "concurrency" : 2, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 5.2973334, + "ops_per_second" : 188.77422364995942, + "bytes_per_second" : 193304.80501755845, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:44", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1024, + "concurrency" : 4, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 5.43793225, + "ops_per_second" : 183.89342750638352, + "bytes_per_second" : 188306.86976653672, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:44", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1024, + "concurrency" : 8, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 6.3278176375, + "ops_per_second" : 158.03236712666722, + "bytes_per_second" : 161825.14393770724, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:44", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1024, + "concurrency" : 16, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 9.302775556250001, + "ops_per_second" : 107.49480022961076, + "bytes_per_second" : 110074.67543512142, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:45", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 160 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 5120, + "concurrency" : 2, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 5.47122685, + "ops_per_second" : 182.77436257281124, + "bytes_per_second" : 935804.7363727936, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:45", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 5120, + "concurrency" : 4, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 6.304113575000001, + "ops_per_second" : 158.62658375408472, + "bytes_per_second" : 812168.1088209138, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:45", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 5120, + "concurrency" : 8, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 6.5377285625, + "ops_per_second" : 152.95832343605346, + "bytes_per_second" : 783146.6159925937, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:45", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 5120, + "concurrency" : 16, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 8.40026040625, + "ops_per_second" : 119.04392859725819, + "bytes_per_second" : 609504.914417962, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:45", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 160 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10240, + "concurrency" : 2, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 6.47210625, + "ops_per_second" : 154.5092063344912, + "bytes_per_second" : 1582174.27286519, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:46", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10240, + "concurrency" : 4, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 6.0498542749999995, + "ops_per_second" : 165.29323757967708, + "bytes_per_second" : 1692602.7528158934, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:46", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10240, + "concurrency" : 8, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 6.3226254375, + "ops_per_second" : 158.1621448060041, + "bytes_per_second" : 1619580.362813482, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:46", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10240, + "concurrency" : 16, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 9.958747137500001, + "ops_per_second" : 100.41423747315223, + "bytes_per_second" : 1028241.7917250788, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:46", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 160 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 102400, + "concurrency" : 2, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 11.63213755, + "ops_per_second" : 85.968722060031, + "bytes_per_second" : 8803197.138947174, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:46", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 102400, + "concurrency" : 4, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 12.218777175, + "ops_per_second" : 81.84125020677448, + "bytes_per_second" : 8380544.021173706, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:46", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 102400, + "concurrency" : 8, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 12.66189735, + "ops_per_second" : 78.97710527561652, + "bytes_per_second" : 8087255.580223132, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:47", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 102400, + "concurrency" : 16, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 18.78697475625, + "ops_per_second" : 53.22836768422881, + "bytes_per_second" : 5450584.85086503, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:47", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 160 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 512000, + "concurrency" : 2, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 38.70131685, + "ops_per_second" : 25.838914057519982, + "bytes_per_second" : 1.322952399745023E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:47", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 512000, + "concurrency" : 4, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 41.161697950000004, + "ops_per_second" : 24.2944302544254, + "bytes_per_second" : 1.2438748290265804E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:48", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 512000, + "concurrency" : 8, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 44.232299475000005, + "ops_per_second" : 22.607913490122705, + "bytes_per_second" : 1.1575251706942825E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:48", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 512000, + "concurrency" : 16, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 78.43433174375, + "ops_per_second" : 12.749518964056, + "bytes_per_second" : 6527753.709596672, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:49", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 160 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1048576, + "concurrency" : 2, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 75.52462514999999, + "ops_per_second" : 13.24071450886241, + "bytes_per_second" : 1.3883895456844911E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:50", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1048576, + "concurrency" : 4, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 76.2624354, + "ops_per_second" : 13.112615598426062, + "bytes_per_second" : 1.3749574013735207E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:51", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1048576, + "concurrency" : 8, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 82.39212384999999, + "ops_per_second" : 12.137082445168696, + "bytes_per_second" : 1.272665336202521E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:52", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1048576, + "concurrency" : 16, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 140.12463019375, + "ops_per_second" : 7.1365041150674395, + "bytes_per_second" : 7483166.9389609555, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:18:54", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 160 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10485760, + "concurrency" : 2, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 702.0862186500001, + "ops_per_second" : 1.4243264907304984, + "bytes_per_second" : 1.4935145743442232E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:19:01", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10485760, + "concurrency" : 4, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 715.780166625, + "ops_per_second" : 1.3970769890358024, + "bytes_per_second" : 1.4649414008552056E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:19:08", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10485760, + "concurrency" : 8, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 841.5612348625, + "ops_per_second" : 1.1882676608356215, + "bytes_per_second" : 1.2459889507283727E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:19:17", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10485760, + "concurrency" : 16, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 1331.88083618125, + "ops_per_second" : 0.7508179206686282, + "bytes_per_second" : 7872896.519830274, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:19:31", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 160 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 52428800, + "concurrency" : 2, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 3389.8473124999996, + "ops_per_second" : 0.29499853763693673, + "bytes_per_second" : 1.5466419330059428E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:20:05", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 52428800, + "concurrency" : 4, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 3463.6789792249997, + "ops_per_second" : 0.28871035855168964, + "bytes_per_second" : 1.5136737646434825E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:20:41", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 52428800, + "concurrency" : 8, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 3645.1419333625004, + "ops_per_second" : 0.27433774000606315, + "bytes_per_second" : 1.4383198503229883E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:21:18", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 52428800, + "concurrency" : 16, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 6639.6078595812505, + "ops_per_second" : 0.15061130433432982, + "bytes_per_second" : 7896369.952683711, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:22:26", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 160 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 104857600, + "concurrency" : 2, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 6830.170477149999, + "ops_per_second" : 0.1464092299519391, + "bytes_per_second" : 1.535212047060845E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:23:36", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 104857600, + "concurrency" : 4, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 7016.660151075, + "ops_per_second" : 0.14251794706728005, + "bytes_per_second" : 1.4944089886402024E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:24:48", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 104857600, + "concurrency" : 8, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 7251.248158837499, + "ops_per_second" : 0.13790729238541427, + "bytes_per_second" : 1.4460627702032816E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:26:02", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 104857600, + "concurrency" : 16, + "put_latency_ms" : 0.0, + "get_latency_ms" : 0.0, + "end_to_end_latency_ms" : 13867.87969890625, + "ops_per_second" : 0.0721090766369187, + "bytes_per_second" : 7561184.714363367, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "p50_latency" : 0.0, + "p95_latency" : 0.0, + "p99_latency" : 0.0, + "timestamp" : "2025-09-06 14:28:23", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 160 + } ] +} \ No newline at end of file From 6d28b94d3b973c2329ad9e2482c7ebcef39cfecf Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Mon, 8 Sep 2025 09:23:50 -0700 Subject: [PATCH 06/14] remove go --- .../benchmarks/go/README.md | 45 --- .../go/benchmark/benchmark_tests.go | 172 --------- .../benchmarks/go/benchmark/config.go | 67 ---- .../go/benchmark/dbesdk_benchmark.go | 188 ---------- .../benchmarks/go/benchmark/keyringsetup.go | 30 -- .../benchmarks/go/benchmark/results.go | 117 ------ .../benchmarks/go/benchmark/testRunners.go | 352 ------------------ .../benchmarks/go/go.mod | 50 --- .../benchmarks/go/go.sum | 103 ----- .../benchmarks/go/main.go | 104 ------ 10 files changed, 1228 deletions(-) delete mode 100644 db-esdk-performance-testing/benchmarks/go/README.md delete mode 100644 db-esdk-performance-testing/benchmarks/go/benchmark/benchmark_tests.go delete mode 100644 db-esdk-performance-testing/benchmarks/go/benchmark/config.go delete mode 100644 db-esdk-performance-testing/benchmarks/go/benchmark/dbesdk_benchmark.go delete mode 100644 db-esdk-performance-testing/benchmarks/go/benchmark/keyringsetup.go delete mode 100644 db-esdk-performance-testing/benchmarks/go/benchmark/results.go delete mode 100644 db-esdk-performance-testing/benchmarks/go/benchmark/testRunners.go delete mode 100644 db-esdk-performance-testing/benchmarks/go/go.mod delete mode 100644 db-esdk-performance-testing/benchmarks/go/go.sum delete mode 100644 db-esdk-performance-testing/benchmarks/go/main.go diff --git a/db-esdk-performance-testing/benchmarks/go/README.md b/db-esdk-performance-testing/benchmarks/go/README.md deleted file mode 100644 index 0d69f41d8..000000000 --- a/db-esdk-performance-testing/benchmarks/go/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# ESDK Go Benchmark - -Performance benchmark suite for the AWS Encryption SDK (ESDK) Go implementation. - -## Quick Start - -```bash -# Run quick benchmark -go run . --config ../../config/test-scenarios.yaml --quick - -# Run full benchmark -go run . --config ../../config/test-scenarios.yaml -``` - -## Build - -```bash -# Build release binary -go build -o esdk-benchmark . - -# Run built binary -./esdk-benchmark --quick -``` - -## Configuration - -The benchmark uses YAML configuration files. See `../../config/test-scenarios.yaml` for the full configuration format. - -### Quick Mode - -Quick mode runs a subset of tests with reduced iterations: - -- Only runs test types specified in `quick_config.test_types` -- Uses smaller data sizes from `quick_config.data_sizes.small` -- Fewer iterations: `quick_config.iterations.measurement` - -## Test Types - -- **throughput**: Measures operations per second and latency -- **memory**: Measures peak memory usage during operations -- **concurrency**: Tests performance under concurrent load - -## Output - -Results are saved to JSON format in `../../results/raw-data/go_results.json` by default. diff --git a/db-esdk-performance-testing/benchmarks/go/benchmark/benchmark_tests.go b/db-esdk-performance-testing/benchmarks/go/benchmark/benchmark_tests.go deleted file mode 100644 index f15485993..000000000 --- a/db-esdk-performance-testing/benchmarks/go/benchmark/benchmark_tests.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package benchmark - -import ( - "bytes" - "context" - "fmt" - "runtime/metrics" - "strconv" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/dynamodb" - "github.com/aws/aws-sdk-go-v2/service/dynamodb/types" -) - -// === Helper Functions === - -// runBatchPutGetCycle performs a BatchWriteItem-BatchGetItem cycle with 25 items and measures performance -func (b *DBESDKBenchmark) runBatchPutGetCycle(data []byte) (float64, float64, error) { - ctx := context.Background() - tableName := b.Config.TableName - - // Create 25 write requests with same data, different sort_key - var items []map[string]types.AttributeValue - - for i := 0; i < 25; i++ { - item := map[string]types.AttributeValue{ - "partition_key": &types.AttributeValueMemberS{Value: "benchmark-test"}, - "sort_key": &types.AttributeValueMemberN{Value: strconv.Itoa(i)}, - "attribute1": &types.AttributeValueMemberM{Value: map[string]types.AttributeValue{ - "data": &types.AttributeValueMemberB{Value: data}, - }}, - "attribute2": &types.AttributeValueMemberS{Value: "sign me!"}, - ":attribute3": &types.AttributeValueMemberS{Value: "ignore me!"}, - } - items = append(items, item) - } - - var writeRequests []types.WriteRequest - for _, item := range items { - writeRequests = append(writeRequests, types.WriteRequest{ - PutRequest: &types.PutRequest{Item: item}, - }) - } - - // BatchWriteItem - batchWriteStart := time.Now() - _, err := b.DbesdkClient.BatchWriteItem(ctx, &dynamodb.BatchWriteItemInput{ - RequestItems: map[string][]types.WriteRequest{tableName: writeRequests}, - }) - if err != nil { - return 0, 0, fmt.Errorf("BatchWriteItem failed: %w", err) - } - batchWriteDuration := time.Since(batchWriteStart).Seconds() * 1000 - - // Create 25 keys for BatchGetItem - var keys []map[string]types.AttributeValue - for i := 0; i < 25; i++ { - keys = append(keys, map[string]types.AttributeValue{ - "partition_key": &types.AttributeValueMemberS{Value: "benchmark-test"}, - "sort_key": &types.AttributeValueMemberN{Value: strconv.Itoa(i)}, - }) - } - - // BatchGetItem - batchGetStart := time.Now() - result, err := b.DbesdkClient.BatchGetItem(ctx, &dynamodb.BatchGetItemInput{ - RequestItems: map[string]types.KeysAndAttributes{ - tableName: {Keys: keys, ConsistentRead: aws.Bool(true)}, - }, - }) - if err != nil { - return 0, 0, fmt.Errorf("BatchGetItem failed: %w", err) - } - batchGetDuration := time.Since(batchGetStart).Seconds() * 1000 - - // Verify 25 items retrieved with correct data size - returnedItems := result.Responses[tableName] - if len(returnedItems) != 25 { - return 0, 0, fmt.Errorf("expected 25 items, got %d", len(returnedItems)) - } - - // Verify each returned item - for i, item := range returnedItems { - if _, ok := item["attribute1"]; !ok { - return 0, 0, fmt.Errorf("item %d missing attribute1", i) - } - - // Verify attribute1 - if attr1, ok := item["attribute1"].(*types.AttributeValueMemberM); ok { - if dataAttr, ok := attr1.Value["data"].(*types.AttributeValueMemberB); ok { - if !bytes.Equal(dataAttr.Value, data) { - return 0, 0, fmt.Errorf("item %d data mismatch", i) - } - } - } - - // Verify attribute2 value - if attr2, ok := item["attribute2"].(*types.AttributeValueMemberS); ok { - if attr2.Value != "sign me!" { - return 0, 0, fmt.Errorf("item %d attribute2 mismatch: got %s", i, attr2.Value) - } - } else { - return 0, 0, fmt.Errorf("item %d attribute2 wrong type", i) - } - - // Verify :attribute3 value - if attr3, ok := item[":attribute3"].(*types.AttributeValueMemberS); ok { - if attr3.Value != "ignore me!" { - return 0, 0, fmt.Errorf("item %d :attribute3 mismatch: got %s", i, attr3.Value) - } - } else { - return 0, 0, fmt.Errorf("item %d :attribute3 wrong type", i) - } - } - - return batchWriteDuration, batchGetDuration, nil -} - -// shouldRunTestType checks if a test type should be run based on quick config -func (b *DBESDKBenchmark) shouldRunTestType(testType string) bool { - if b.Config.QuickConfig == nil || len(b.Config.QuickConfig.TestTypes) == 0 { - return true - } - - for _, allowedType := range b.Config.QuickConfig.TestTypes { - if allowedType == testType { - return true - } - } - return false -} - -// === Memory Test Implementation === - -// sampleMemoryContinuously runs continuous memory sampling during operation -func (b *DBESDKBenchmark) sampleMemoryContinuously(beforeHeap, beforeAllocs uint64, stopChan chan bool) []MemorySample { - var samples []MemorySample - ticker := time.NewTicker(SamplingIntervalMs * time.Millisecond) - defer ticker.Stop() - - for { - select { - case <-stopChan: - return samples - case <-ticker.C: - var currentSamples [2]metrics.Sample - currentSamples[0].Name = "/memory/classes/heap/objects:bytes" - currentSamples[1].Name = "/gc/heap/allocs:bytes" - metrics.Read(currentSamples[:]) - - var heapDelta, allocsDelta uint64 - if currentSamples[0].Value.Uint64() > beforeHeap { - heapDelta = currentSamples[0].Value.Uint64() - beforeHeap - } - if currentSamples[1].Value.Uint64() > beforeAllocs { - allocsDelta = currentSamples[1].Value.Uint64() - beforeAllocs - } - - sample := MemorySample{ - Timestamp: time.Now(), - HeapMB: float64(heapDelta) / (1024 * 1024), - MetricsAllocsMB: float64(allocsDelta) / (1024 * 1024), - MemStatsAllocsMB: 0, - } - samples = append(samples, sample) - } - } -} diff --git a/db-esdk-performance-testing/benchmarks/go/benchmark/config.go b/db-esdk-performance-testing/benchmarks/go/benchmark/config.go deleted file mode 100644 index 2d50b3164..000000000 --- a/db-esdk-performance-testing/benchmarks/go/benchmark/config.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package benchmark - -import ( - "fmt" - "os" - - "gopkg.in/yaml.v3" -) - -type KeyringType string - -const ( - RawAESKeying KeyringType = "raw-aes" -) - -// TestConfig represents the configuration for benchmark tests -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"` - TableName string `yaml:"table_name"` - Keyring KeyringType `yaml:"keyring"` -} - -// QuickConfig represents the quick test configuration -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"` -} - -// LoadConfig loads the test configuration from YAML file -func LoadConfig(configPath string) (TestConfig, error) { - var config TestConfig - - if _, err := os.Stat(configPath); os.IsNotExist(err) { - return config, fmt.Errorf("config file not found: %s", configPath) - } - - data, err := os.ReadFile(configPath) - if err != nil { - return config, fmt.Errorf("failed to read config file: %w", err) - } - - if err := yaml.Unmarshal(data, &config); err != nil { - return config, fmt.Errorf("failed to parse config file: %w", err) - } - - return config, nil -} diff --git a/db-esdk-performance-testing/benchmarks/go/benchmark/dbesdk_benchmark.go b/db-esdk-performance-testing/benchmarks/go/benchmark/dbesdk_benchmark.go deleted file mode 100644 index 23b8bd43e..000000000 --- a/db-esdk-performance-testing/benchmarks/go/benchmark/dbesdk_benchmark.go +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package benchmark - -import ( - "context" - "crypto/rand" - "fmt" - "log" - "net/url" - "runtime" - - mplsmithygenerated "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/awscryptographymaterialproviderssmithygenerated" - mpltypes "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/awscryptographymaterialproviderssmithygeneratedtypes" - dbesdkdynamodbencryptiontypes "github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk/awscryptographydbencryptionsdkdynamodbsmithygeneratedtypes" - dbesdkstructuredencryptiontypes "github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk/awscryptographydbencryptionsdkstructuredencryptionsmithygeneratedtypes" - "github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk/dbesdkmiddleware" - "github.com/aws/aws-sdk-go-v2/config" - "github.com/aws/aws-sdk-go-v2/service/dynamodb" - smithyendpoints "github.com/aws/smithy-go/endpoints" - "github.com/shirou/gopsutil/v3/mem" -) - -// Constants for memory testing -const ( - MemoryTestIterations = 5 - SamplingIntervalMs = 1 - GCSettleTimeMs = 5 - FinalSampleWaitMs = 2 -) - -// DBESDKBenchmark is the main benchmark struct -type DBESDKBenchmark struct { - Config TestConfig - DbesdkClient *dynamodb.Client - Keyring mpltypes.IKeyring - Results []BenchmarkResult - CPUCount int - TotalMemoryGB float64 -} - -// New creates a new benchmark instance -func New(configPath string) (*DBESDKBenchmark, error) { - benchmark := &DBESDKBenchmark{ - CPUCount: runtime.NumCPU(), - } - - // Get system memory - if vmStat, err := mem.VirtualMemory(); err == nil { - benchmark.TotalMemoryGB = float64(vmStat.Total) / (1024 * 1024 * 1024) - } - - // Load configuration - config, err := LoadConfig(configPath) - if err != nil { - return nil, fmt.Errorf("failed to load config: %w", err) - } - benchmark.Config = config - - // Setup MPL - if err := benchmark.setupMPL(); err != nil { - return nil, fmt.Errorf("failed to setup MPL: %w", err) - } - - // Setup DB-ESDK - if err := benchmark.setupDBESDK(); err != nil { - return nil, fmt.Errorf("failed to setup DB-ESDK: %w", err) - } - - log.Printf("Initialized DB-ESDK Benchmark - CPU cores: %d, Memory: %.1fGB", - benchmark.CPUCount, benchmark.TotalMemoryGB) - - return benchmark, nil -} - -func (b *DBESDKBenchmark) setupMPL() error { - // Initialize the material providers client - matProvConfig := mpltypes.MaterialProvidersConfig{} - matProv, err := mplsmithygenerated.NewClient(matProvConfig) - if err != nil { - return fmt.Errorf("failed to create material providers client: %w", err) - } - - switch b.Config.Keyring { - case RawAESKeying: - b.Keyring, err = SetupRawAESKeyring(matProv) - if err != nil { - return fmt.Errorf("failed to create keyring: %w", err) - } - default: - return fmt.Errorf("unsupported keyring type: %s", b.Config.Keyring) - } - return nil -} - -// setupDBESDK initializes the DynamoDB client with DB-ESDK middleware and creates a default keyring which is AES keyring -func (b *DBESDKBenchmark) setupDBESDK() error { - ddbTableName := b.Config.TableName - - // Initialize the material providers client - matProvConfig := mpltypes.MaterialProvidersConfig{} - matProv, err := mplsmithygenerated.NewClient(matProvConfig) - if err != nil { - return fmt.Errorf("failed to create material providers client: %w", err) - } - - // Create default AES-256 keyring - key := make([]byte, 32) // 256-bit key - if _, err := rand.Read(key); err != nil { - return fmt.Errorf("failed to generate AES-256 key: %w", err) - } - - keyringInput := mpltypes.CreateRawAesKeyringInput{ - KeyName: "test-aes-256-key", - KeyNamespace: "DB-ESDK-performance-test", - WrappingKey: key, - WrappingAlg: mpltypes.AesWrappingAlgAlgAes256GcmIv12Tag16, - } - - keyring, err := matProv.CreateRawAesKeyring(context.Background(), keyringInput) - if err != nil { - return fmt.Errorf("failed to create keyring: %w", err) - } - b.Keyring = keyring - - attributeActions := map[string]dbesdkstructuredencryptiontypes.CryptoAction{ - "partition_key": dbesdkstructuredencryptiontypes.CryptoActionSignOnly, - "sort_key": dbesdkstructuredencryptiontypes.CryptoActionSignOnly, - "attribute1": dbesdkstructuredencryptiontypes.CryptoActionEncryptAndSign, - "attribute2": dbesdkstructuredencryptiontypes.CryptoActionSignOnly, - ":attribute3": dbesdkstructuredencryptiontypes.CryptoActionDoNothing, - } - - allowedUnsignedAttributePrefix := ":" - - partitionKey := "partition_key" - sortKeyName := "sort_key" - algorithmSuiteID := mpltypes.DBEAlgorithmSuiteIdAlgAes256GcmHkdfSha512CommitKeyEcdsaP384SymsigHmacSha384 - tableConfig := dbesdkdynamodbencryptiontypes.DynamoDbTableEncryptionConfig{ - LogicalTableName: ddbTableName, - PartitionKeyName: partitionKey, - SortKeyName: &sortKeyName, - AttributeActionsOnEncrypt: attributeActions, - Keyring: keyring, - AllowedUnsignedAttributePrefix: &allowedUnsignedAttributePrefix, - AlgorithmSuiteId: &algorithmSuiteID, - } - tableConfigsMap := make(map[string]dbesdkdynamodbencryptiontypes.DynamoDbTableEncryptionConfig) - tableConfigsMap[ddbTableName] = tableConfig - listOfTableConfigs := dbesdkdynamodbencryptiontypes.DynamoDbTablesEncryptionConfig{ - TableEncryptionConfigs: tableConfigsMap, - } - - cfg, err := config.LoadDefaultConfig(context.TODO()) - - dbEsdkMiddleware, err := dbesdkmiddleware.NewDBEsdkMiddleware(listOfTableConfigs) - ddb := dynamodb.NewFromConfig(cfg, dbEsdkMiddleware.CreateMiddleware(), func(o *dynamodb.Options) { - o.EndpointResolverV2 = &resolverV2{} - }) - - b.DbesdkClient = ddb - - log.Println("ESDK client initialized successfully") - return nil -} - -type resolverV2 struct { -} - -func (*resolverV2) ResolveEndpoint(ctx context.Context, params dynamodb.EndpointParameters) ( - smithyendpoints.Endpoint, error, -) { - u, err := url.Parse("http://localhost:8000") - if err != nil { - return smithyendpoints.Endpoint{}, err - } - return smithyendpoints.Endpoint{ - URI: *u, - }, nil -} - -// GenerateTestData creates test data of specified size -func (b *DBESDKBenchmark) GenerateTestData(size int) []byte { - data := make([]byte, size) - rand.Read(data) - return data -} diff --git a/db-esdk-performance-testing/benchmarks/go/benchmark/keyringsetup.go b/db-esdk-performance-testing/benchmarks/go/benchmark/keyringsetup.go deleted file mode 100644 index da53309ee..000000000 --- a/db-esdk-performance-testing/benchmarks/go/benchmark/keyringsetup.go +++ /dev/null @@ -1,30 +0,0 @@ -package benchmark - -import ( - "context" - "crypto/rand" - "fmt" - - mplsmithygenerated "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/awscryptographymaterialproviderssmithygenerated" - mpltypes "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/awscryptographymaterialproviderssmithygeneratedtypes" -) - -func SetupRawAESKeyring(matProv *mplsmithygenerated.Client) (mpltypes.IKeyring, error) { - key := make([]byte, 32) - if _, err := rand.Read(key); err != nil { - return nil, fmt.Errorf("failed to generate AES-256 key: %w", err) - } - - keyringInput := mpltypes.CreateRawAesKeyringInput{ - KeyName: "test-aes-256-key", - KeyNamespace: "DB-ESDK-performance-test", - WrappingKey: key, - WrappingAlg: mpltypes.AesWrappingAlgAlgAes256GcmIv12Tag16, - } - - keyring, err := matProv.CreateRawAesKeyring(context.Background(), keyringInput) - if err != nil { - return nil, fmt.Errorf("failed to create keyring: %w", err) - } - return keyring, nil -} diff --git a/db-esdk-performance-testing/benchmarks/go/benchmark/results.go b/db-esdk-performance-testing/benchmarks/go/benchmark/results.go deleted file mode 100644 index c71e2ad98..000000000 --- a/db-esdk-performance-testing/benchmarks/go/benchmark/results.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package benchmark - -import ( - "encoding/json" - "fmt" - "math" - "os" - "path/filepath" - "runtime" - "time" -) - -// BenchmarkResult represents the results of a single benchmark test -type BenchmarkResult struct { - TestName string `json:"test_name"` - Language string `json:"language"` - DataSize int `json:"data_size"` - Concurrency int `json:"concurrency"` - PutLatencyMs float64 `json:"put_latency_ms"` - GetLatencyMs float64 `json:"get_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"` -} - -// MemorySample represents a single memory measurement -type MemorySample struct { - Timestamp time.Time - HeapMB float64 - MetricsAllocsMB float64 - MemStatsAllocsMB float64 -} - -// === Utility Functions === - -// Average calculates the average of a slice of float64 values -func Average(values []float64) float64 { - if len(values) == 0 { - return 0 - } - sum := 0.0 - for _, v := range values { - sum += v - } - return sum / float64(len(values)) -} - -// Percentile calculates the percentile of sorted values -func Percentile(sortedValues []float64, p float64) float64 { - if len(sortedValues) == 0 { - return 0 - } - if p <= 0 { - return sortedValues[0] - } - if p >= 100 { - return sortedValues[len(sortedValues)-1] - } - - index := (p / 100.0) * float64(len(sortedValues)-1) - lower := int(math.Floor(index)) - upper := int(math.Ceil(index)) - - if lower == upper { - return sortedValues[lower] - } - - weight := index - float64(lower) - return sortedValues[lower]*(1-weight) + sortedValues[upper]*weight -} - -// === Results Saving === - -// SaveResults saves benchmark results to JSON file -func (b *DBESDKBenchmark) SaveResults(outputPath string) error { - if err := os.MkdirAll(filepath.Dir(outputPath), 0755); err != nil { - return fmt.Errorf("failed to create output directory: %w", err) - } - - resultsData := map[string]interface{}{ - "metadata": map[string]interface{}{ - "language": "go", - "timestamp": time.Now().Format("2006-01-02 15:04:05"), - "go_version": runtime.Version(), - "cpu_count": b.CPUCount, - "total_memory_gb": b.TotalMemoryGB, - "total_tests": len(b.Results), - }, - "results": b.Results, - } - - file, err := os.Create(outputPath) - if err != nil { - return fmt.Errorf("failed to create output file: %w", err) - } - defer file.Close() - - encoder := json.NewEncoder(file) - encoder.SetIndent("", " ") - if err := encoder.Encode(resultsData); err != nil { - return fmt.Errorf("failed to encode results to JSON: %w", err) - } - - return nil -} diff --git a/db-esdk-performance-testing/benchmarks/go/benchmark/testRunners.go b/db-esdk-performance-testing/benchmarks/go/benchmark/testRunners.go deleted file mode 100644 index ea1dfd06d..000000000 --- a/db-esdk-performance-testing/benchmarks/go/benchmark/testRunners.go +++ /dev/null @@ -1,352 +0,0 @@ -package benchmark - -import ( - "fmt" - "log" - "runtime" - "runtime/metrics" - "sort" - "sync" - "time" - - "github.com/schollz/progressbar/v3" -) - -// === Test Orchestration === - -// runThroughputTests executes all throughput tests -func (b *DBESDKBenchmark) runThroughputTests(dataSizes []int, iterations int) { - log.Println("Running throughput tests...") - for _, dataSize := range dataSizes { - result, err := b.runThroughputTest(dataSize, iterations) - if err != nil { - log.Printf("Throughput test failed: %v", err) - continue - } - b.Results = append(b.Results, *result) - log.Printf("Throughput test completed: %.2f ops/sec", result.OpsPerSecond) - } -} - -// runMemoryTests executes all memory tests -func (b *DBESDKBenchmark) runMemoryTests(dataSizes []int) { - log.Println("Running memory tests...") - for _, dataSize := range dataSizes { - result, err := b.runMemoryTest(dataSize) - if err != nil { - log.Printf("Memory test failed: %v", err) - continue - } - b.Results = append(b.Results, *result) - log.Printf("Memory test completed: %.2f MB peak", result.PeakMemoryMB) - } -} - -// runConcurrencyTests executes all concurrency tests -func (b *DBESDKBenchmark) runConcurrencyTests(dataSizes []int, concurrencyLevels []int) { - log.Println("Running concurrency tests...") - for _, dataSize := range dataSizes { - for _, concurrency := range concurrencyLevels { - if concurrency > 1 { // Skip single-threaded - result, err := b.runConcurrentTest(dataSize, concurrency, 5) - if err != nil { - log.Printf("Concurrent test failed: %v", err) - continue - } - b.Results = append(b.Results, *result) - log.Printf("Concurrent test completed: %.2f ops/sec @ %d threads", result.OpsPerSecond, concurrency) - } - } - } -} - -// RunAllBenchmarks runs all configured benchmark tests -func (b *DBESDKBenchmark) RunAllBenchmarks() error { - log.Println("Starting comprehensive DB-ESDK benchmark suite") - - // Combine all data sizes - var dataSizes []int - for _, sizes := range [][]int{b.Config.DataSizes.Small, b.Config.DataSizes.Medium, b.Config.DataSizes.Large} { - dataSizes = append(dataSizes, sizes...) - } - - // Run test suites - if b.shouldRunTestType("throughput") { - b.runThroughputTests(dataSizes, b.Config.Iterations.Measurement) - } else { - log.Println("Skipping throughput tests (not in test_types)") - } - - if b.shouldRunTestType("memory") { - b.runMemoryTests(dataSizes) - } else { - log.Println("Skipping memory tests (not in test_types)") - } - - if b.shouldRunTestType("concurrency") { - b.runConcurrencyTests(dataSizes, b.Config.ConcurrencyLevels) - } else { - log.Println("Skipping concurrency tests (not in test_types)") - } - - log.Printf("Benchmark suite completed. Total results: %d", len(b.Results)) - return nil -} - -// === Memory Test Implementation === - -// runMemoryTest runs memory benchmark with continuous sampling -func (b *DBESDKBenchmark) runMemoryTest(dataSize int) (*BenchmarkResult, error) { - log.Printf("Running memory test - Size: %d bytes (%d iterations, continuous sampling)", dataSize, MemoryTestIterations) - - data := b.GenerateTestData(dataSize) - - // Setup runtime/metrics tracking - samples := make([]metrics.Sample, 2) - samples[0].Name = "/memory/classes/heap/objects:bytes" - samples[1].Name = "/gc/heap/allocs:bytes" - - var peakHeap, peakAllocations float64 - var avgHeapValues []float64 - - // Run iterations - for i := 0; i < MemoryTestIterations; i++ { - runtime.GC() - time.Sleep(GCSettleTimeMs * time.Millisecond) - - // Get baseline - metrics.Read(samples) - beforeHeap := samples[0].Value.Uint64() - beforeAllocs := samples[1].Value.Uint64() - - // Start continuous sampling - stopSampling := make(chan bool) - var continuousSamples []MemorySample - var samplingMutex sync.Mutex - - go func() { - sampledData := b.sampleMemoryContinuously(beforeHeap, beforeAllocs, stopSampling) - samplingMutex.Lock() - continuousSamples = sampledData - samplingMutex.Unlock() - }() - - // Run operation - operationStart := time.Now() - _, _, err := b.runBatchPutGetCycle(data) - operationDuration := time.Since(operationStart) - - close(stopSampling) - time.Sleep(FinalSampleWaitMs * time.Millisecond) - - if err != nil { - log.Printf("Iteration %d failed: %v", i+1, err) - continue - } - - // Analyze samples - samplingMutex.Lock() - var iterPeakHeap, iterTotalAllocs, iterAvgHeap float64 - if len(continuousSamples) > 0 { - var heapSum float64 - for _, s := range continuousSamples { - if s.HeapMB > iterPeakHeap { - iterPeakHeap = s.HeapMB - } - if s.MetricsAllocsMB > iterTotalAllocs { - iterTotalAllocs = s.MetricsAllocsMB - } - heapSum += s.HeapMB - } - iterAvgHeap = heapSum / float64(len(continuousSamples)) - } - samplingMutex.Unlock() - - // Update global metrics - if iterPeakHeap > peakHeap { - peakHeap = iterPeakHeap - } - if iterTotalAllocs > peakAllocations { - peakAllocations = iterTotalAllocs - } - avgHeapValues = append(avgHeapValues, iterAvgHeap) - - log.Printf("=== Iteration %d === Peak Heap: %.2f MB, Total Allocs: %.2f MB, Avg Heap: %.2f MB (%v, %d samples)", - i+1, iterPeakHeap, iterTotalAllocs, iterAvgHeap, operationDuration, len(continuousSamples)) - } - - if len(avgHeapValues) == 0 { - return nil, fmt.Errorf("all memory test iterations failed") - } - - overallAvgHeap := Average(avgHeapValues) - memoryEfficiency := float64(dataSize) / (overallAvgHeap * 1024 * 1024) - if overallAvgHeap == 0 { - memoryEfficiency = 0 - } - - log.Printf("\nMemory Summary:") - log.Printf("- Absolute Peak Heap: %.2f MB (across all runs)", peakHeap) - log.Printf("- Average Heap: %.2f MB (across all runs)", overallAvgHeap) - log.Printf("- Total Allocations: %.2f MB (max across all runs)", peakAllocations) - - result := &BenchmarkResult{ - TestName: "memory", - Language: "go", - DataSize: dataSize, - Concurrency: 1, - PeakMemoryMB: peakHeap, - MemoryEfficiency: memoryEfficiency, - Timestamp: time.Now().Format("2006-01-02 15:04:05"), - GoVersion: runtime.Version(), - CPUCount: b.CPUCount, - TotalMemoryGB: b.TotalMemoryGB, - } - - return result, nil -} - -// === Concurrent Test Implementation === - -// runConcurrentTest runs concurrent operations benchmark test -func (b *DBESDKBenchmark) runConcurrentTest(dataSize int, concurrency int, iterationsPerWorker int) (*BenchmarkResult, error) { - log.Printf("Running concurrent test - Size: %d bytes, Concurrency: %d", dataSize, concurrency) - - data := b.GenerateTestData(dataSize) - var allTimes []float64 - var timesMutex sync.Mutex - var wg sync.WaitGroup - - errorChan := make(chan error, concurrency) - startTime := time.Now() - - // Launch workers - for i := 0; i < concurrency; i++ { - wg.Add(1) - go func(workerID int) { - defer wg.Done() - - var workerTimes []float64 - for j := 0; j < iterationsPerWorker; j++ { - iterStart := time.Now() - _, _, err := b.runBatchPutGetCycle(data) - if err != nil { - errorChan <- fmt.Errorf("worker %d iteration %d failed: %w", workerID, j, err) - return - } - workerTimes = append(workerTimes, time.Since(iterStart).Seconds()*1000) - } - - timesMutex.Lock() - allTimes = append(allTimes, workerTimes...) - timesMutex.Unlock() - }(i) - } - - wg.Wait() - totalDuration := time.Since(startTime).Seconds() - - // Check for errors - select { - case err := <-errorChan: - return nil, err - default: - } - - // Calculate metrics - totalOps := concurrency * iterationsPerWorker - totalBytes := int64(totalOps * dataSize) - - sort.Float64s(allTimes) - result := &BenchmarkResult{ - TestName: "concurrent", - Language: "go", - DataSize: dataSize, - Concurrency: concurrency, - EndToEndLatencyMs: Average(allTimes), - OpsPerSecond: float64(totalOps) / totalDuration, - BytesPerSecond: float64(totalBytes) / totalDuration, - P50Latency: Percentile(allTimes, 0.50), - P95Latency: Percentile(allTimes, 0.95), - P99Latency: Percentile(allTimes, 0.99), - Timestamp: time.Now().Format("2006-01-02 15:04:05"), - GoVersion: runtime.Version(), - CPUCount: b.CPUCount, - TotalMemoryGB: b.TotalMemoryGB, - } - - log.Printf("Concurrent test completed - Ops/sec: %.2f, Avg latency: %.2f ms", - result.OpsPerSecond, result.EndToEndLatencyMs) - - return result, nil -} - -// === Throughput Test Implementation === - -// runThroughputTest runs throughput benchmark test -func (b *DBESDKBenchmark) runThroughputTest(dataSize int, iterations int) (*BenchmarkResult, error) { - log.Printf("Running throughput test - Size: %d bytes, Iterations: %d", dataSize, iterations) - - testData := b.GenerateTestData(dataSize) - - // Warmup - for i := 0; i < b.Config.Iterations.Warmup; i++ { - if _, _, err := b.runBatchPutGetCycle(testData); err != nil { - return nil, fmt.Errorf("warmup iteration %d failed: %w", i, err) - } - } - - // Measurement runs - var putLatencies, getLatencies, endToEndLatencies []float64 - var totalBytes int64 - - bar := progressbar.NewOptions(iterations, - progressbar.OptionSetDescription("Throughput test"), - progressbar.OptionShowCount(), - progressbar.OptionSetWidth(50), - ) - - startTime := time.Now() - for i := 0; i < iterations; i++ { - iterationStart := time.Now() - putMs, getMs, err := b.runBatchPutGetCycle(testData) - if err != nil { - return nil, fmt.Errorf("measurement iteration %d failed: %w", i, err) - } - iterationDuration := time.Since(iterationStart).Seconds() * 1000 - - putLatencies = append(putLatencies, putMs) - getLatencies = append(getLatencies, getMs) - endToEndLatencies = append(endToEndLatencies, iterationDuration) - totalBytes += int64(dataSize) - - bar.Add(1) - } - totalDuration := time.Since(startTime).Seconds() - - // Calculate metrics - sort.Float64s(endToEndLatencies) - result := &BenchmarkResult{ - TestName: "throughput", - Language: "go", - DataSize: dataSize, - Concurrency: 1, - PutLatencyMs: Average(putLatencies), - GetLatencyMs: Average(getLatencies), - EndToEndLatencyMs: Average(endToEndLatencies), - OpsPerSecond: float64(iterations) / totalDuration, - BytesPerSecond: float64(totalBytes) / totalDuration, - P50Latency: Percentile(endToEndLatencies, 0.50), - P95Latency: Percentile(endToEndLatencies, 0.95), - P99Latency: Percentile(endToEndLatencies, 0.99), - Timestamp: time.Now().Format("2006-01-02 15:04:05"), - GoVersion: runtime.Version(), - CPUCount: b.CPUCount, - TotalMemoryGB: b.TotalMemoryGB, - } - - log.Printf("Throughput test completed - Ops/sec: %.2f, MB/sec: %.2f", - result.OpsPerSecond, result.BytesPerSecond/(1024*1024)) - - return result, nil -} diff --git a/db-esdk-performance-testing/benchmarks/go/go.mod b/db-esdk-performance-testing/benchmarks/go/go.mod deleted file mode 100644 index e521a2d68..000000000 --- a/db-esdk-performance-testing/benchmarks/go/go.mod +++ /dev/null @@ -1,50 +0,0 @@ -module github.com/aws/aws-database-encryption-sdk-dynamodb/db-esdk-performance-testing/benchmarks/go - -go 1.23.2 - -toolchain go1.24.4 - -replace github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk => ../../../DynamoDbEncryption/runtimes/go/ImplementationFromDafny-go/ - -require ( - github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl v0.2.2 - github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk v0.0.0 - github.com/aws/aws-sdk-go-v2 v1.38.1 - github.com/aws/aws-sdk-go-v2/config v1.31.2 - github.com/aws/aws-sdk-go-v2/service/dynamodb v1.49.1 - github.com/aws/smithy-go v1.22.5 - github.com/schollz/progressbar/v3 v3.14.1 - github.com/shirou/gopsutil/v3 v3.23.12 - gopkg.in/yaml.v3 v3.0.1 -) - -require ( - github.com/aws/aws-cryptographic-material-providers-library/releases/go/dynamodb v0.2.2 // indirect - github.com/aws/aws-cryptographic-material-providers-library/releases/go/kms v0.2.2 // indirect - github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives v0.2.2 // indirect - github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library v0.2.2 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.18.6 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.4 // indirect - github.com/aws/aws-sdk-go-v2/service/kms v1.44.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.28.2 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.33.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.38.0 // indirect - github.com/dafny-lang/DafnyRuntimeGo/v4 v4.11.0 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect - github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/rivo/uniseg v0.4.4 // indirect - github.com/tklauser/go-sysconf v0.3.12 // indirect - github.com/tklauser/numcpus v0.6.1 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.14.0 // indirect -) diff --git a/db-esdk-performance-testing/benchmarks/go/go.sum b/db-esdk-performance-testing/benchmarks/go/go.sum deleted file mode 100644 index 5c23c6894..000000000 --- a/db-esdk-performance-testing/benchmarks/go/go.sum +++ /dev/null @@ -1,103 +0,0 @@ -github.com/aws/aws-cryptographic-material-providers-library/releases/go/dynamodb v0.2.2 h1:1CYvKblXRaPB9B0cdN/xWVOXvii2AQHgdcbTlI5F8Oc= -github.com/aws/aws-cryptographic-material-providers-library/releases/go/dynamodb v0.2.2/go.mod h1:vb/jlzf5XQSD5O3Po50VX6j6JyzcWs3wPoV7foewmJs= -github.com/aws/aws-cryptographic-material-providers-library/releases/go/kms v0.2.2 h1:0x9qTjQeW8fkP+/kuRw2drLDZM617rr8h6kcUetBjKE= -github.com/aws/aws-cryptographic-material-providers-library/releases/go/kms v0.2.2/go.mod h1:2wGHS+a/Dg21W3cnFDYbOu33d6eQUS52Ff/uAE2vIu8= -github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl v0.2.2 h1:gXYtIJfwt+5gOmo7zg/TDb0l1cz5XgnWR0/opB0OyyA= -github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl v0.2.2/go.mod h1:9yccmncslXtxhE4vyg1ZKaTWEe5xyNljrt3glFtMN4g= -github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives v0.2.2 h1:tBPXcmQVmf0ILx5eY++l64+yp04AFlHeKqpli0YDQBc= -github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives v0.2.2/go.mod h1:mSUejB7V5Wo23naCw2ORAJ+5ZJkyaSvB6hQbKPVXNuA= -github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library v0.2.2 h1:k/OqY+NJcTlFByY1WcM6dF5ZC4kIZtZ8b3A9kRVAj8Y= -github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library v0.2.2/go.mod h1:j4QF5oVY9L1yNZrzoDu3l3d8TRh53uBw3FLZCL7xCTk= -github.com/aws/aws-sdk-go-v2 v1.38.1 h1:j7sc33amE74Rz0M/PoCpsZQ6OunLqys/m5antM0J+Z8= -github.com/aws/aws-sdk-go-v2 v1.38.1/go.mod h1:9Q0OoGQoboYIAJyslFyF1f5K1Ryddop8gqMhWx/n4Wg= -github.com/aws/aws-sdk-go-v2/config v1.31.2 h1:NOaSZpVGEH2Np/c1toSeW0jooNl+9ALmsUTZ8YvkJR0= -github.com/aws/aws-sdk-go-v2/config v1.31.2/go.mod h1:17ft42Yb2lF6OigqSYiDAiUcX4RIkEMY6XxEMJsrAes= -github.com/aws/aws-sdk-go-v2/credentials v1.18.6 h1:AmmvNEYrru7sYNJnp3pf57lGbiarX4T9qU/6AZ9SucU= -github.com/aws/aws-sdk-go-v2/credentials v1.18.6/go.mod h1:/jdQkh1iVPa01xndfECInp1v1Wnp70v3K4MvtlLGVEc= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.4 h1:lpdMwTzmuDLkgW7086jE94HweHCqG+uOJwHf3LZs7T0= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.4/go.mod h1:9xzb8/SV62W6gHQGC/8rrvgNXU6ZoYM3sAIJCIrXJxY= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.4 h1:IdCLsiiIj5YJ3AFevsewURCPV+YWUlOW8JiPhoAy8vg= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.4/go.mod h1:l4bdfCD7XyyZA9BolKBo1eLqgaJxl0/x91PL4Yqe0ao= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.4 h1:j7vjtr1YIssWQOMeOWRbh3z8g2oY/xPjnZH2gLY4sGw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.4/go.mod h1:yDmJgqOiH4EA8Hndnv4KwAo8jCGTSnM5ASG1nBI+toA= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.49.1 h1:0RqS5X7EodJzOenoY4V3LUSp9PirELO2ZOpOZbMldco= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.49.1/go.mod h1:VRp/OeQolnQD9GfNgdSf3kU5vbg708PF6oPHh2bq3hc= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 h1:6+lZi2JeGKtCraAj1rpoZfKqnQ9SptseRZioejfUOLM= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0/go.mod h1:eb3gfbVIxIoGgJsi9pGne19dhCBpK6opTYpQqAmdy44= -github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.4 h1:upi++G3fQCAUBXQe58TbjXmdVPwrqMnRQMThOAIz7KM= -github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.4/go.mod h1:swb+GqWXTZMOyVV9rVePAUu5L80+X5a+Lui1RNOyUFo= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.4 h1:ueB2Te0NacDMnaC+68za9jLwkjzxGWm0KB5HTUHjLTI= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.4/go.mod h1:nLEfLnVMmLvyIG58/6gsSA03F1voKGaCfHV7+lR8S7s= -github.com/aws/aws-sdk-go-v2/service/kms v1.44.2 h1:yTtMSIGWk8KzPDX2pS9k7wNCPKiNWpiJ9DdB2mCAMzo= -github.com/aws/aws-sdk-go-v2/service/kms v1.44.2/go.mod h1:zgkQ8ige7qtxldA4cGtiXdbql3dBo4TfsP6uQyHwq0E= -github.com/aws/aws-sdk-go-v2/service/sso v1.28.2 h1:ve9dYBB8CfJGTFqcQ3ZLAAb/KXWgYlgu/2R2TZL2Ko0= -github.com/aws/aws-sdk-go-v2/service/sso v1.28.2/go.mod h1:n9bTZFZcBa9hGGqVz3i/a6+NG0zmZgtkB9qVVFDqPA8= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.33.2 h1:pd9G9HQaM6UZAZh19pYOkpKSQkyQQ9ftnl/LttQOcGI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.33.2/go.mod h1:eknndR9rU8UpE/OmFpqU78V1EcXPKFTTm5l/buZYgvM= -github.com/aws/aws-sdk-go-v2/service/sts v1.38.0 h1:iV1Ko4Em/lkJIsoKyGfc0nQySi+v0Udxr6Igq+y9JZc= -github.com/aws/aws-sdk-go-v2/service/sts v1.38.0/go.mod h1:bEPcjW7IbolPfK67G1nilqWyoxYMSPrDiIQ3RdIdKgo= -github.com/aws/smithy-go v1.22.5 h1:P9ATCXPMb2mPjYBgueqJNCA5S9UfktsW0tTxi+a7eqw= -github.com/aws/smithy-go v1.22.5/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= -github.com/dafny-lang/DafnyRuntimeGo/v4 v4.11.0 h1:wJhHuhD9thOc0GXojfW8DJ/n7G8prW+1nUL5O3lvzs0= -github.com/dafny-lang/DafnyRuntimeGo/v4 v4.11.0/go.mod h1:l2Tm4N2DKuq3ljONC2vOATeM9PUpXbIc8SgXdwwqEto= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= -github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= -github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/schollz/progressbar/v3 v3.14.1 h1:VD+MJPCr4s3wdhTc7OEJ/Z3dAeBzJ7yKH/P4lC5yRTI= -github.com/schollz/progressbar/v3 v3.14.1/go.mod h1:Zc9xXneTzWXF81TGoqL71u0sBPjULtEHYtj/WVgVy8E= -github.com/shirou/gopsutil/v3 v3.23.12 h1:z90NtUkp3bMtmICZKpC4+WaknU1eXtp5vtbQ11DgpE4= -github.com/shirou/gopsutil/v3 v3.23.12/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= -github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= -github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= -github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/db-esdk-performance-testing/benchmarks/go/main.go b/db-esdk-performance-testing/benchmarks/go/main.go deleted file mode 100644 index 74985ea9f..000000000 --- a/db-esdk-performance-testing/benchmarks/go/main.go +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package main - -import ( - "context" - "flag" - "fmt" - "log" - - "github.com/aws/aws-database-encryption-sdk-dynamodb/db-esdk-performance-testing/benchmarks/go/benchmark" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/dynamodb" - "github.com/aws/aws-sdk-go-v2/service/dynamodb/types" -) - -func main() { - // Parse command line arguments - configPath := flag.String("config", "../../config/test-scenarios.yaml", "Path to test configuration file") - outputPath := flag.String("output", "../../results/raw-data/go_results.json", "Path to output results file") - quick := flag.Bool("quick", false, "Run quick test with reduced iterations") - flag.Parse() - - // Initialize benchmark - bench, err := benchmark.New(*configPath) - if err != nil { - log.Fatalf("Failed to initialize benchmark: %v", err) - } - - // create dynamodb table - CreateTable(bench.DbesdkClient, bench.Config.TableName) - - // Adjust config for quick test - if *quick { - if bench.Config.QuickConfig == nil { - log.Fatalf("Quick mode requested but no quick_config found in config file") - } - bench.Config.Iterations.Measurement = bench.Config.QuickConfig.Iterations.Measurement - bench.Config.Iterations.Warmup = bench.Config.QuickConfig.Iterations.Warmup - bench.Config.DataSizes.Small = bench.Config.QuickConfig.DataSizes.Small - bench.Config.DataSizes.Medium = []int{} - bench.Config.DataSizes.Large = []int{} - bench.Config.ConcurrencyLevels = bench.Config.QuickConfig.ConcurrencyLevels - } - - // Run benchmarks - if err := bench.RunAllBenchmarks(); err != nil { - log.Fatalf("Benchmark failed: %v", err) - } - - // Save results - if err := bench.SaveResults(*outputPath); err != nil { - log.Fatalf("Failed to save results: %v", err) - } - - // Print summary - fmt.Printf("\n=== ESDK Go Benchmark Summary ===\n") - fmt.Printf("Total tests completed: %d\n", len(bench.Results)) - fmt.Printf("Results saved to: %s\n", *outputPath) - - if len(bench.Results) > 0 { - var maxThroughput float64 - for _, result := range bench.Results { - if result.TestName == "throughput" && result.OpsPerSecond > maxThroughput { - maxThroughput = result.OpsPerSecond - } - } - if maxThroughput > 0 { - fmt.Printf("Maximum throughput: %.2f ops/sec\n", maxThroughput) - } - } -} - -// Create DynamoDB table -func CreateTable(dynamodbClient *dynamodb.Client, tableName string) error { - input := &dynamodb.CreateTableInput{ - TableName: &tableName, - KeySchema: []types.KeySchemaElement{ - { - AttributeName: aws.String("partition_key"), - KeyType: types.KeyTypeHash, - }, - { - AttributeName: aws.String("sort_key"), - KeyType: types.KeyTypeRange, - }, - }, - AttributeDefinitions: []types.AttributeDefinition{ - { - AttributeName: aws.String("partition_key"), - AttributeType: types.ScalarAttributeTypeS, - }, - { - AttributeName: aws.String("sort_key"), - AttributeType: types.ScalarAttributeTypeN, - }, - }, - BillingMode: types.BillingModePayPerRequest, - } - - _, err := dynamodbClient.CreateTable(context.Background(), input) - return err -} From e81fa5ad6578133c052cb2dfcd927934a75a4707 Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Mon, 8 Sep 2025 11:40:32 -0700 Subject: [PATCH 07/14] auto commit --- .../amazon/esdk/benchmark/ESDKBenchmark.java | 121 ++++++++++++++---- .../java/com/amazon/esdk/benchmark/Tests.java | 6 +- .../esdk/benchmark/model/TestResult.java | 101 ++++++++------- 3 files changed, 152 insertions(+), 76 deletions(-) diff --git a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/ESDKBenchmark.java b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/ESDKBenchmark.java index e68f4cb8c..c67c59150 100644 --- a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/ESDKBenchmark.java +++ b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/ESDKBenchmark.java @@ -151,7 +151,7 @@ private DynamoDbItemEncryptor setupItemEncryptorClient() { /** * Run a single batch put-get cycle and measure performance */ - public Result runBatchPutGetCycle(final byte[] data) { + public Result runItemEncryptorCycle(final byte[] data) { // Create 25 items with same data, different sort_key final Map item = new HashMap<>(); item.put("partition_key", AttributeValue.builder().s("benchmark-test").build()); @@ -187,7 +187,7 @@ public Result runBatchPutGetCycle(final byte[] data) { } public List runAllBenchmarks() { - System.out.println("Starting comprehensive DB-ESDK benchmark suite"); + System.out.println("Starting comprehensive ESDK benchmark suite"); final List allResults = new ArrayList<>(); // Get test parameters from config @@ -212,46 +212,113 @@ public List runAllBenchmarks() { System.out.println("Running " + totalTests + " total tests"); - try (ProgressBar pb = new ProgressBar("DB-ESDK Benchmark", totalTests)) { - // Run throughput tests - for (final Integer dataSize : dataSizes) { - final TestResult result = Tests.runThroughputTest( - this, - dataSize, - config.iterations.measurement - ); - allResults.add(result); + try ( + final ProgressBar pb = new ProgressBar("Running benchmarks", totalTests) + ) { + // Throughput tests + for (final int dataSize : dataSizes) { + try { + final TestResult result = Tests.runThroughputTest( + this, + dataSize, + config.iterations.measurement + ); + if (result != null) { + allResults.add(result); + System.out.println( + "Throughput test completed: " + + String.format("%.2f", result.opsPerSecond) + + " ops/sec" + ); + System.out.flush(); + System.out.println( + "Throughput test completed - Ops/sec: " + + String.format("%.2f", result.opsPerSecond) + + ", MB/sec: " + + String.format("%.2f", result.bytesPerSecond / (1024 * 1024)) + ); + } + } catch (final Exception e) { + System.err.println( + "Throughput test failed for data size " + + dataSize + + " bytes: " + + e.getMessage() + ); + } + System.out.flush(); pb.step(); + System.out.flush(); } - // Run memory tests - for (final Integer dataSize : dataSizes) { - final TestResult result = Tests.runMemoryTest(this, dataSize); - allResults.add(result); + // Memory tests + for (final int dataSize : dataSizes) { + try { + final TestResult result = Tests.runMemoryTest(this, dataSize); + allResults.add(result); + System.out.println( + "Memory test completed: " + + String.format("%.2f", result.peakMemoryMb) + + " MB peak" + ); + System.out.flush(); + } catch (final Exception e) { + System.err.println( + "Memory test failed for data size " + + dataSize + + " bytes: " + + e.getMessage() + ); + } + System.out.flush(); pb.step(); + System.out.flush(); } - // Run concurrency tests - for (final Integer dataSize : dataSizes) { - for (final Integer concurrency : config.concurrencyLevels) { - if (concurrency > 1) { - final TestResult result = Tests.runConcurrentTest( - this, - dataSize, - concurrency, - config.iterations.measurement - ); - allResults.add(result); + // Concurrent tests + for (final int dataSize : dataSizes) { + for (final int concurrency : config.concurrencyLevels) { + if (concurrency > 1) { // Skip single-threaded for concurrent tests + try { + final TestResult result = Tests.runConcurrentTest( + this, + dataSize, + concurrency, + 5 + ); + allResults.add(result); + System.out.println( + "Concurrent test completed: " + + String.format("%.2f", result.opsPerSecond) + + " ops/sec @ " + + concurrency + + " threads" + ); + } catch (final Exception e) { + System.err.println( + "Concurrent test failed for data size " + + dataSize + + " bytes with " + + concurrency + + " threads: " + + e.getMessage() + ); + } + System.out.flush(); pb.step(); + System.out.flush(); } } } } - System.out.println("Benchmark suite completed successfully"); + System.out.println( + "Benchmark suite completed. Total results: " + allResults.size() + ); return allResults; } + public record Result( double putLatencyMs, double getLatencyMs diff --git a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Tests.java b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Tests.java index d0e7b5a3e..ebaa01b04 100644 --- a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Tests.java +++ b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Tests.java @@ -93,7 +93,7 @@ private static MeasurementResults runMeasurementIterations( for (int i = 0; i < iterations; i++) { try { final long iterationStart = System.nanoTime(); - final var result = benchmark.runBatchPutGetCycle(data); + final var result = benchmark.runItemEncryptorCycle(data); final double totalMs = (System.nanoTime() - iterationStart) / 1_000_000.0; @@ -257,7 +257,7 @@ private static IterationResult runSingleMemoryIteration( // Run the actual operation try { - benchmark.runBatchPutGetCycle(data); + benchmark.runItemEncryptorCycle(data); } catch (final Exception e) { System.out.println( "Memory test iteration " + iteration + " failed: " + e.getMessage() @@ -397,7 +397,7 @@ public static TestResult runConcurrentTest( for (int j = 0; j < iterationsPerThread; j++) { try { final long threadStartTime = System.nanoTime(); - benchmark.runBatchPutGetCycle(data); + benchmark.runItemEncryptorCycle(data); final double elapsed = (System.nanoTime() - threadStartTime) / 1_000_000.0; allTimes.add(elapsed); diff --git a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/TestResult.java b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/TestResult.java index b4e7c3772..672d0d3e1 100644 --- a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/TestResult.java +++ b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/model/TestResult.java @@ -18,16 +18,7 @@ public final class TestResult { @JsonProperty("concurrency") public int concurrency = 1; - @JsonProperty("put_latency_ms") - public double putLatencyMs; - - @JsonProperty("get_latency_ms") - public double getLatencyMs; - - @JsonProperty("end_to_end_latency_ms") - public double endToEndLatencyMs; - - @JsonProperty("ops_per_second") + @JsonProperty("operations_per_second") public double opsPerSecond; @JsonProperty("bytes_per_second") @@ -39,14 +30,23 @@ public final class TestResult { @JsonProperty("memory_efficiency_ratio") public double memoryEfficiencyRatio; - @JsonProperty("p50_latency") - public double p50Latency; + @JsonProperty("avg_latency_ms") + public double avgLatencyMs; + + @JsonProperty("p50_latency_ms") + public double p50LatencyMs; - @JsonProperty("p95_latency") - public double p95Latency; + @JsonProperty("p95_latency_ms") + public double p95LatencyMs; - @JsonProperty("p99_latency") - public double p99Latency; + @JsonProperty("p99_latency_ms") + public double p99LatencyMs; + + @JsonProperty("encrypt_latency_ms") + public double encryptLatencyMs; + + @JsonProperty("decrypt_latency_ms") + public double decryptLatencyMs; @JsonProperty("timestamp") public String timestamp = ""; @@ -88,24 +88,29 @@ public static TestResult createThroughputResult( result.concurrency = 1; result.opsPerSecond = opsPerSecond; result.bytesPerSecond = opsPerSecond * dataSize; - result.endToEndLatencyMs = avgTotalLatency; - result.p50Latency = calculatePercentile(totalLatencies, 50); - result.p95Latency = calculatePercentile(totalLatencies, 95); - result.p99Latency = calculatePercentile(totalLatencies, 99); - result.putLatencyMs = putLatencies - .stream() - .mapToDouble(Double::doubleValue) - .average() - .orElse(0.0); - result.getLatencyMs = getLatencies - .stream() - .mapToDouble(Double::doubleValue) - .average() - .orElse(0.0); + result.avgLatencyMs = avgTotalLatency; + result.p50LatencyMs = calculatePercentile(totalLatencies, 50); + result.p95LatencyMs = calculatePercentile(totalLatencies, 95); + result.p99LatencyMs = calculatePercentile(totalLatencies, 99); + result.encryptLatencyMs = + putLatencies + .stream() + .mapToDouble(Double::doubleValue) + .average() + .orElse(0.0); + result.decryptLatencyMs = + getLatencies + .stream() + .mapToDouble(Double::doubleValue) + .average() + .orElse(0.0); result.iterations = putLatencies.size(); - result.timestamp = java.time.LocalDateTime - .now() - .format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + result.timestamp = + java.time.LocalDateTime + .now() + .format( + java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss") + ); result.javaVersion = System.getProperty("java.version"); result.cpuCount = cpuCount; result.totalMemoryGb = totalMemoryMB / 1024.0; @@ -130,9 +135,12 @@ public static TestResult createMemoryResult( result.concurrency = 1; result.peakMemoryMb = peakMemoryMb; result.memoryEfficiencyRatio = memoryEfficiency; - result.timestamp = java.time.LocalDateTime - .now() - .format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + result.timestamp = + java.time.LocalDateTime + .now() + .format( + java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss") + ); result.javaVersion = System.getProperty("java.version"); result.cpuCount = cpuCount; result.totalMemoryGb = totalMemoryMB / 1024.0; @@ -153,11 +161,9 @@ public static TestResult createConcurrentResult( .mapToDouble(Double::doubleValue) .average() .orElse(0.0); - final double totalTimeSeconds = allTimes - .stream() - .mapToDouble(Double::doubleValue) - .sum() / 1000.0; - final double opsPerSecond = totalTimeSeconds > 0 ? totalOps / totalTimeSeconds : 0.0; + final double opsPerSecond = + totalOps / + (allTimes.stream().mapToDouble(Double::doubleValue).sum() / 1000.0); final var result = new TestResult(); result.testName = "concurrent"; @@ -165,11 +171,14 @@ public static TestResult createConcurrentResult( result.concurrency = concurrency; result.opsPerSecond = opsPerSecond; result.bytesPerSecond = opsPerSecond * dataSize; - result.endToEndLatencyMs = avgLatency; + result.avgLatencyMs = avgLatency; result.iterations = totalOps; - result.timestamp = java.time.LocalDateTime - .now() - .format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + result.timestamp = + java.time.LocalDateTime + .now() + .format( + java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss") + ); result.javaVersion = System.getProperty("java.version"); result.cpuCount = cpuCount; result.totalMemoryGb = totalMemoryMB / 1024.0; @@ -187,4 +196,4 @@ private static double calculatePercentile( final int clampedIndex = Math.max(0, Math.min(index, values.size() - 1)); return values.get(clampedIndex); } -} +} \ No newline at end of file From 32d09c8401b1ec8fb0efe2138d3b1f7bf4e3d2ae Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Mon, 8 Sep 2025 12:24:25 -0700 Subject: [PATCH 08/14] auto commit --- .../java/src/main/java/com/amazon/esdk/benchmark/Program.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Program.java b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Program.java index 95767251b..94bc36a32 100644 --- a/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Program.java +++ b/db-esdk-performance-testing/benchmarks/java/src/main/java/com/amazon/esdk/benchmark/Program.java @@ -38,7 +38,7 @@ private static CommandLineOptions parseArgs(final String[] args) { // Default options final CommandLineOptions options = new CommandLineOptions(); options.configPath = "../config/test-scenarios.yaml"; - options.outputPath = "../../results/raw-data/java_results.json"; + options.outputPath = "../results/raw-data/java_results.json"; options.quickTest = false; // Simple argument parsing From c4961dbd9dead5bf30749f24a06608c020150a23 Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Mon, 8 Sep 2025 12:24:53 -0700 Subject: [PATCH 09/14] auto commit --- .../results/raw-data/java_results.json | 1091 +++++++++++++++++ 1 file changed, 1091 insertions(+) create mode 100644 db-esdk-performance-testing/benchmarks/results/raw-data/java_results.json diff --git a/db-esdk-performance-testing/benchmarks/results/raw-data/java_results.json b/db-esdk-performance-testing/benchmarks/results/raw-data/java_results.json new file mode 100644 index 000000000..a4196239d --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/results/raw-data/java_results.json @@ -0,0 +1,1091 @@ +{ + "metadata" : { + "language" : "java", + "timestamp" : "2025-09-08 11:55:39", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "total_tests" : 54 + }, + "results" : [ { + "language" : "java", + "test_name" : "throughput", + "data_size" : 1024, + "concurrency" : 1, + "operations_per_second" : 115.0451198907053, + "bytes_per_second" : 117806.20276808222, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 8.6922418, + "p50_latency_ms" : 7.8825, + "p95_latency_ms" : 14.78225, + "p99_latency_ms" : 14.78225, + "encrypt_latency_ms" : 3.9275998999999997, + "decrypt_latency_ms" : 4.7478499, + "timestamp" : "2025-09-08 11:46:45", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 5120, + "concurrency" : 1, + "operations_per_second" : 143.8708341462635, + "bytes_per_second" : 736618.6708288691, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 6.950679099999999, + "p50_latency_ms" : 6.874625, + "p95_latency_ms" : 7.555458, + "p99_latency_ms" : 7.555458, + "encrypt_latency_ms" : 3.4125791999999997, + "decrypt_latency_ms" : 3.5264916, + "timestamp" : "2025-09-08 11:46:45", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 10240, + "concurrency" : 1, + "operations_per_second" : 155.5157590728088, + "bytes_per_second" : 1592481.3729055622, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 6.4302165, + "p50_latency_ms" : 6.281583, + "p95_latency_ms" : 7.201583, + "p99_latency_ms" : 7.201583, + "encrypt_latency_ms" : 3.1387957, + "decrypt_latency_ms" : 3.2792123, + "timestamp" : "2025-09-08 11:46:45", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 102400, + "concurrency" : 1, + "operations_per_second" : 79.32329235830495, + "bytes_per_second" : 8122705.137490427, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 12.6066376, + "p50_latency_ms" : 12.51525, + "p95_latency_ms" : 13.038959, + "p99_latency_ms" : 13.038959, + "encrypt_latency_ms" : 6.6231543, + "decrypt_latency_ms" : 5.9605042, + "timestamp" : "2025-09-08 11:46:45", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 512000, + "concurrency" : 1, + "operations_per_second" : 25.50681245639674, + "bytes_per_second" : 1.305948797767513E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 39.2052124, + "p50_latency_ms" : 38.225042, + "p95_latency_ms" : 44.972083, + "p99_latency_ms" : 44.972083, + "encrypt_latency_ms" : 21.9098082, + "decrypt_latency_ms" : 17.2458585, + "timestamp" : "2025-09-08 11:46:46", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 1048576, + "concurrency" : 1, + "operations_per_second" : 13.961656753017767, + "bytes_per_second" : 1.4639858191452358E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 71.62473750000001, + "p50_latency_ms" : 71.51675, + "p95_latency_ms" : 72.820375, + "p99_latency_ms" : 72.820375, + "encrypt_latency_ms" : 40.0376915, + "decrypt_latency_ms" : 31.5381958, + "timestamp" : "2025-09-08 11:46:47", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 10485760, + "concurrency" : 1, + "operations_per_second" : 1.5027615971107828, + "bytes_per_second" : 1.5757597444520362E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 665.4415457, + "p50_latency_ms" : 665.21775, + "p95_latency_ms" : 668.471125, + "p99_latency_ms" : 668.471125, + "encrypt_latency_ms" : 374.6874331, + "decrypt_latency_ms" : 290.3426126, + "timestamp" : "2025-09-08 11:46:57", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 52428800, + "concurrency" : 1, + "operations_per_second" : 0.29788644207688386, + "bytes_per_second" : 1.5617828694360528E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 3356.9839332999995, + "p50_latency_ms" : 3345.4625, + "p95_latency_ms" : 3409.787, + "p99_latency_ms" : 3409.787, + "encrypt_latency_ms" : 1878.5476334999998, + "decrypt_latency_ms" : 1475.6690290000001, + "timestamp" : "2025-09-08 11:47:48", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 104857600, + "concurrency" : 1, + "operations_per_second" : 0.14872135089533312, + "bytes_per_second" : 1.5594563923642483E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 6723.9841084, + "p50_latency_ms" : 6730.469416, + "p95_latency_ms" : 6816.788042, + "p99_latency_ms" : 6816.788042, + "encrypt_latency_ms" : 3789.1793335, + "decrypt_latency_ms" : 2930.9112166, + "timestamp" : "2025-09-08 11:49:31", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 1024, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 3.4590606689453125, + "memory_efficiency_ratio" : 2.8232014221877167E-4, + "avg_latency_ms" : 0.0, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:49:32", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 5120, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 3.4590530395507812, + "memory_efficiency_ratio" : 0.001411603824564112, + "avg_latency_ms" : 0.0, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:49:33", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 10240, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 3.3278121948242188, + "memory_efficiency_ratio" : 0.002934548113979683, + "avg_latency_ms" : 0.0, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:49:33", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 102400, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 5.15667724609375, + "memory_efficiency_ratio" : 0.01893782475410418, + "avg_latency_ms" : 0.0, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:49:34", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 512000, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 15.132316589355469, + "memory_efficiency_ratio" : 0.03226744874895572, + "avg_latency_ms" : 0.0, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:49:35", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 1048576, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 36.000083923339844, + "memory_efficiency_ratio" : 0.027777713022265275, + "avg_latency_ms" : 0.0, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:49:36", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 10485760, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 52.01019287109375, + "memory_efficiency_ratio" : 0.19227000416600656, + "avg_latency_ms" : 0.0, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:49:39", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 52428800, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 211.35906219482422, + "memory_efficiency_ratio" : 0.23656425932620553, + "avg_latency_ms" : 0.0, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:49:57", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 104857600, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 419.2744369506836, + "memory_efficiency_ratio" : 0.23850726680902398, + "avg_latency_ms" : 0.0, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:33", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1024, + "concurrency" : 2, + "operations_per_second" : 179.75171363150534, + "bytes_per_second" : 184065.75475866147, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 5.563229300000001, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:34", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1024, + "concurrency" : 4, + "operations_per_second" : 156.38164402270888, + "bytes_per_second" : 160134.8034792539, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 6.3946124, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:34", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1024, + "concurrency" : 8, + "operations_per_second" : 125.57271241921629, + "bytes_per_second" : 128586.45751727748, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 7.963513575, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:34", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1024, + "concurrency" : 16, + "operations_per_second" : 109.29949669754097, + "bytes_per_second" : 111922.68461828196, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 9.1491729625, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:34", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 5120, + "concurrency" : 2, + "operations_per_second" : 163.98752592806773, + "bytes_per_second" : 839616.1327517068, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 6.0980248, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:34", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 5120, + "concurrency" : 4, + "operations_per_second" : 140.20300876918645, + "bytes_per_second" : 717839.4048982346, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 7.132514550000001, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:34", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 5120, + "concurrency" : 8, + "operations_per_second" : 119.00508783344551, + "bytes_per_second" : 609306.049707241, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 8.403002075, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:35", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 5120, + "concurrency" : 16, + "operations_per_second" : 71.57089052780145, + "bytes_per_second" : 366442.95950234344, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 13.972160925, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:35", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10240, + "concurrency" : 2, + "operations_per_second" : 158.46678693028062, + "bytes_per_second" : 1622699.8981660735, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 6.3104706, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:35", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10240, + "concurrency" : 4, + "operations_per_second" : 142.06441631090718, + "bytes_per_second" : 1454739.6230236895, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 7.03906035, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:35", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10240, + "concurrency" : 8, + "operations_per_second" : 112.89122542366842, + "bytes_per_second" : 1156006.1483383647, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 8.858084375, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:35", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10240, + "concurrency" : 16, + "operations_per_second" : 112.19235228461446, + "bytes_per_second" : 1148849.687394452, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 8.913263512499999, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:36", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 102400, + "concurrency" : 2, + "operations_per_second" : 74.1860857215621, + "bytes_per_second" : 7596655.1778879585, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 13.4796167, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:36", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 102400, + "concurrency" : 4, + "operations_per_second" : 65.68432992521649, + "bytes_per_second" : 6726075.384342168, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 15.2243313, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:36", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 102400, + "concurrency" : 8, + "operations_per_second" : 57.45536995059531, + "bytes_per_second" : 5883429.88294096, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 17.404813525, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:36", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 102400, + "concurrency" : 16, + "operations_per_second" : 42.34140567892608, + "bytes_per_second" : 4335759.94152203, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 23.617543724999997, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:36", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 512000, + "concurrency" : 2, + "operations_per_second" : 21.127508179599303, + "bytes_per_second" : 1.0817284187954843E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 47.331658399999995, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:37", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 512000, + "concurrency" : 4, + "operations_per_second" : 22.39972864789518, + "bytes_per_second" : 1.1468661067722332E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 44.64339795, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:37", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 512000, + "concurrency" : 8, + "operations_per_second" : 16.69883656479568, + "bytes_per_second" : 8549804.321175389, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 59.884411475, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:37", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 512000, + "concurrency" : 16, + "operations_per_second" : 11.670848738304166, + "bytes_per_second" : 5975474.554011733, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 85.6835713, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:38", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1048576, + "concurrency" : 2, + "operations_per_second" : 12.987509177331141, + "bytes_per_second" : 1.3618390423129179E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 76.9970582, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:39", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1048576, + "concurrency" : 4, + "operations_per_second" : 12.91239814930342, + "bytes_per_second" : 1.3539630801803984E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 77.44494775, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:39", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1048576, + "concurrency" : 8, + "operations_per_second" : 10.917783209385842, + "bytes_per_second" : 1.1448125446564969E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 91.59368535, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:40", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1048576, + "concurrency" : 16, + "operations_per_second" : 6.155327672561361, + "bytes_per_second" : 6454328.869583702, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 162.4608880625, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:41", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10485760, + "concurrency" : 2, + "operations_per_second" : 1.3674876283055815, + "bytes_per_second" : 1.4339147073381534E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 731.2680417, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:44", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10485760, + "concurrency" : 4, + "operations_per_second" : 1.4272412226250475, + "bytes_per_second" : 1.4965708922552818E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 700.6524084, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:48", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10485760, + "concurrency" : 8, + "operations_per_second" : 1.2630863706628956, + "bytes_per_second" : 1.3244420542042164E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 791.711495925, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:50:53", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10485760, + "concurrency" : 16, + "operations_per_second" : 0.695257000414006, + "bytes_per_second" : 7290298.044661167, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 1438.317053125, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:51:00", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 52428800, + "concurrency" : 2, + "operations_per_second" : 0.2898646061358695, + "bytes_per_second" : 1.5197253462176275E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 3449.8865292, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:51:18", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 52428800, + "concurrency" : 4, + "operations_per_second" : 0.2868660356107121, + "bytes_per_second" : 1.5040042007826904E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 3485.9477103, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:51:37", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 52428800, + "concurrency" : 8, + "operations_per_second" : 0.2757878797339764, + "bytes_per_second" : 1.4459227588996701E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 3625.975155125, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:51:56", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 52428800, + "concurrency" : 16, + "operations_per_second" : 0.1436821204142847, + "bytes_per_second" : 7533081.154776449, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 6959.808201025, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:52:32", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 104857600, + "concurrency" : 2, + "operations_per_second" : 0.1468282540478687, + "bytes_per_second" : 1.5396058331649797E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 6810.678275, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:53:07", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 104857600, + "concurrency" : 4, + "operations_per_second" : 0.14162462338136642, + "bytes_per_second" : 1.4850418108673967E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 7060.9190416500005, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:53:44", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 104857600, + "concurrency" : 8, + "operations_per_second" : 0.13455770234792894, + "bytes_per_second" : 1.4109397729718193E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 7431.755912525, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:54:23", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 104857600, + "concurrency" : 16, + "operations_per_second" : 0.0672335755582277, + "bytes_per_second" : 7049951.372454417, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 14873.5210301875, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 11:55:39", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + } ] +} \ No newline at end of file From 2addae7f8a28f2e412a412c7e00acc3539f3f3aa Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Mon, 8 Sep 2025 12:25:39 -0700 Subject: [PATCH 10/14] remove redundant code --- .../results/raw-data/java_results.json | 1091 ----------------- 1 file changed, 1091 deletions(-) delete mode 100644 db-esdk-performance-testing/results/raw-data/java_results.json diff --git a/db-esdk-performance-testing/results/raw-data/java_results.json b/db-esdk-performance-testing/results/raw-data/java_results.json deleted file mode 100644 index ae8fe8ff8..000000000 --- a/db-esdk-performance-testing/results/raw-data/java_results.json +++ /dev/null @@ -1,1091 +0,0 @@ -{ - "metadata" : { - "language" : "java", - "timestamp" : "2025-09-06 14:28:23", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "total_tests" : 54 - }, - "results" : [ { - "language" : "java", - "test_name" : "throughput", - "data_size" : 1024, - "concurrency" : 1, - "put_latency_ms" : 4.3030332, - "get_latency_ms" : 4.0238707, - "end_to_end_latency_ms" : 8.343074900000001, - "ops_per_second" : 119.85988523248183, - "bytes_per_second" : 122736.5224780614, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 7.72825, - "p95_latency" : 13.743709, - "p99_latency" : 13.743709, - "timestamp" : "2025-09-06 14:14:58", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "throughput", - "data_size" : 5120, - "concurrency" : 1, - "put_latency_ms" : 3.4424249000000002, - "get_latency_ms" : 3.5804, - "end_to_end_latency_ms" : 7.0348749, - "ops_per_second" : 142.1489385689005, - "bytes_per_second" : 727802.5654727705, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 6.920958, - "p95_latency" : 7.73725, - "p99_latency" : 7.73725, - "timestamp" : "2025-09-06 14:14:58", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "throughput", - "data_size" : 10240, - "concurrency" : 1, - "put_latency_ms" : 3.3743459000000002, - "get_latency_ms" : 3.3997248, - "end_to_end_latency_ms" : 6.7859666, - "ops_per_second" : 147.362941633105, - "bytes_per_second" : 1508996.5223229954, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 6.566875, - "p95_latency" : 7.526041, - "p99_latency" : 7.526041, - "timestamp" : "2025-09-06 14:14:58", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "throughput", - "data_size" : 102400, - "concurrency" : 1, - "put_latency_ms" : 6.691, - "get_latency_ms" : 5.7249624, - "end_to_end_latency_ms" : 12.438887699999999, - "ops_per_second" : 80.39304028767782, - "bytes_per_second" : 8232247.325458209, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 12.451542, - "p95_latency" : 12.8575, - "p99_latency" : 12.8575, - "timestamp" : "2025-09-06 14:14:58", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "throughput", - "data_size" : 512000, - "concurrency" : 1, - "put_latency_ms" : 21.4278084, - "get_latency_ms" : 17.0769582, - "end_to_end_latency_ms" : 38.554225200000005, - "ops_per_second" : 25.93749439425902, - "bytes_per_second" : 1.3279997129860617E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 38.0565, - "p95_latency" : 40.1145, - "p99_latency" : 40.1145, - "timestamp" : "2025-09-06 14:14:59", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "throughput", - "data_size" : 1048576, - "concurrency" : 1, - "put_latency_ms" : 40.0691791, - "get_latency_ms" : 31.680779100000002, - "end_to_end_latency_ms" : 71.81263340000001, - "ops_per_second" : 13.925126438825176, - "bytes_per_second" : 1.4601553380717548E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 71.495, - "p95_latency" : 75.117375, - "p99_latency" : 75.117375, - "timestamp" : "2025-09-06 14:15:00", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "throughput", - "data_size" : 10485760, - "concurrency" : 1, - "put_latency_ms" : 374.3888584, - "get_latency_ms" : 290.6276292, - "end_to_end_latency_ms" : 665.4637918000001, - "ops_per_second" : 1.5027113605912643, - "bytes_per_second" : 1.5757070676433455E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 664.668208, - "p95_latency" : 672.386959, - "p99_latency" : 672.386959, - "timestamp" : "2025-09-06 14:15:10", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "throughput", - "data_size" : 52428800, - "concurrency" : 1, - "put_latency_ms" : 1890.1900877, - "get_latency_ms" : 1467.8890084, - "end_to_end_latency_ms" : 3359.5464125, - "ops_per_second" : 0.29765923050780296, - "bytes_per_second" : 1.5605916264447499E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 3357.359708, - "p95_latency" : 3421.457041, - "p99_latency" : 3421.457041, - "timestamp" : "2025-09-06 14:16:01", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "throughput", - "data_size" : 104857600, - "concurrency" : 1, - "put_latency_ms" : 3719.7835250999997, - "get_latency_ms" : 2883.4108541, - "end_to_end_latency_ms" : 6606.1604375, - "ops_per_second" : 0.15137385921230134, - "bytes_per_second" : 1.5872699579739809E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 6560.141583, - "p95_latency" : 6773.037709, - "p99_latency" : 6773.037709, - "timestamp" : "2025-09-06 14:17:42", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "memory", - "data_size" : 1024, - "concurrency" : 1, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 0.0, - "ops_per_second" : 0.0, - "bytes_per_second" : 0.0, - "peak_memory_mb" : 3.2283248901367188, - "memory_efficiency_ratio" : 3.024982098250473E-4, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:17:43", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 0 - }, { - "language" : "java", - "test_name" : "memory", - "data_size" : 5120, - "concurrency" : 1, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 0.0, - "ops_per_second" : 0.0, - "bytes_per_second" : 0.0, - "peak_memory_mb" : 3.9408340454101562, - "memory_efficiency_ratio" : 0.0012390302265295732, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:17:44", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 0 - }, { - "language" : "java", - "test_name" : "memory", - "data_size" : 10240, - "concurrency" : 1, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 0.0, - "ops_per_second" : 0.0, - "bytes_per_second" : 0.0, - "peak_memory_mb" : 3.3275222778320312, - "memory_efficiency_ratio" : 0.0029348037923167753, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:17:44", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 0 - }, { - "language" : "java", - "test_name" : "memory", - "data_size" : 102400, - "concurrency" : 1, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 0.0, - "ops_per_second" : 0.0, - "bytes_per_second" : 0.0, - "peak_memory_mb" : 6.683906555175781, - "memory_efficiency_ratio" : 0.014610654591569424, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:17:45", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 0 - }, { - "language" : "java", - "test_name" : "memory", - "data_size" : 512000, - "concurrency" : 1, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 0.0, - "ops_per_second" : 0.0, - "bytes_per_second" : 0.0, - "peak_memory_mb" : 15.356155395507812, - "memory_efficiency_ratio" : 0.03179710268774947, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:17:46", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 0 - }, { - "language" : "java", - "test_name" : "memory", - "data_size" : 1048576, - "concurrency" : 1, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 0.0, - "ops_per_second" : 0.0, - "bytes_per_second" : 0.0, - "peak_memory_mb" : 36.000083923339844, - "memory_efficiency_ratio" : 0.027777713022265275, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:17:47", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 0 - }, { - "language" : "java", - "test_name" : "memory", - "data_size" : 10485760, - "concurrency" : 1, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 0.0, - "ops_per_second" : 0.0, - "bytes_per_second" : 0.0, - "peak_memory_mb" : 54.13105010986328, - "memory_efficiency_ratio" : 0.184736855828664, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:17:50", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 0 - }, { - "language" : "java", - "test_name" : "memory", - "data_size" : 52428800, - "concurrency" : 1, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 0.0, - "ops_per_second" : 0.0, - "bytes_per_second" : 0.0, - "peak_memory_mb" : 211.9617462158203, - "memory_efficiency_ratio" : 0.2358916214489467, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:08", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 0 - }, { - "language" : "java", - "test_name" : "memory", - "data_size" : 104857600, - "concurrency" : 1, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 0.0, - "ops_per_second" : 0.0, - "bytes_per_second" : 0.0, - "peak_memory_mb" : 420.0141296386719, - "memory_efficiency_ratio" : 0.23808722836545432, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:44", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 0 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 1024, - "concurrency" : 2, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 5.2973334, - "ops_per_second" : 188.77422364995942, - "bytes_per_second" : 193304.80501755845, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:44", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 1024, - "concurrency" : 4, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 5.43793225, - "ops_per_second" : 183.89342750638352, - "bytes_per_second" : 188306.86976653672, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:44", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 40 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 1024, - "concurrency" : 8, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 6.3278176375, - "ops_per_second" : 158.03236712666722, - "bytes_per_second" : 161825.14393770724, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:44", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 80 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 1024, - "concurrency" : 16, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 9.302775556250001, - "ops_per_second" : 107.49480022961076, - "bytes_per_second" : 110074.67543512142, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:45", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 160 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 5120, - "concurrency" : 2, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 5.47122685, - "ops_per_second" : 182.77436257281124, - "bytes_per_second" : 935804.7363727936, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:45", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 5120, - "concurrency" : 4, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 6.304113575000001, - "ops_per_second" : 158.62658375408472, - "bytes_per_second" : 812168.1088209138, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:45", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 40 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 5120, - "concurrency" : 8, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 6.5377285625, - "ops_per_second" : 152.95832343605346, - "bytes_per_second" : 783146.6159925937, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:45", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 80 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 5120, - "concurrency" : 16, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 8.40026040625, - "ops_per_second" : 119.04392859725819, - "bytes_per_second" : 609504.914417962, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:45", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 160 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 10240, - "concurrency" : 2, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 6.47210625, - "ops_per_second" : 154.5092063344912, - "bytes_per_second" : 1582174.27286519, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:46", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 10240, - "concurrency" : 4, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 6.0498542749999995, - "ops_per_second" : 165.29323757967708, - "bytes_per_second" : 1692602.7528158934, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:46", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 40 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 10240, - "concurrency" : 8, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 6.3226254375, - "ops_per_second" : 158.1621448060041, - "bytes_per_second" : 1619580.362813482, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:46", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 80 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 10240, - "concurrency" : 16, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 9.958747137500001, - "ops_per_second" : 100.41423747315223, - "bytes_per_second" : 1028241.7917250788, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:46", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 160 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 102400, - "concurrency" : 2, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 11.63213755, - "ops_per_second" : 85.968722060031, - "bytes_per_second" : 8803197.138947174, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:46", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 102400, - "concurrency" : 4, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 12.218777175, - "ops_per_second" : 81.84125020677448, - "bytes_per_second" : 8380544.021173706, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:46", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 40 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 102400, - "concurrency" : 8, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 12.66189735, - "ops_per_second" : 78.97710527561652, - "bytes_per_second" : 8087255.580223132, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:47", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 80 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 102400, - "concurrency" : 16, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 18.78697475625, - "ops_per_second" : 53.22836768422881, - "bytes_per_second" : 5450584.85086503, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:47", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 160 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 512000, - "concurrency" : 2, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 38.70131685, - "ops_per_second" : 25.838914057519982, - "bytes_per_second" : 1.322952399745023E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:47", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 512000, - "concurrency" : 4, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 41.161697950000004, - "ops_per_second" : 24.2944302544254, - "bytes_per_second" : 1.2438748290265804E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:48", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 40 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 512000, - "concurrency" : 8, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 44.232299475000005, - "ops_per_second" : 22.607913490122705, - "bytes_per_second" : 1.1575251706942825E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:48", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 80 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 512000, - "concurrency" : 16, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 78.43433174375, - "ops_per_second" : 12.749518964056, - "bytes_per_second" : 6527753.709596672, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:49", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 160 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 1048576, - "concurrency" : 2, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 75.52462514999999, - "ops_per_second" : 13.24071450886241, - "bytes_per_second" : 1.3883895456844911E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:50", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 1048576, - "concurrency" : 4, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 76.2624354, - "ops_per_second" : 13.112615598426062, - "bytes_per_second" : 1.3749574013735207E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:51", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 40 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 1048576, - "concurrency" : 8, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 82.39212384999999, - "ops_per_second" : 12.137082445168696, - "bytes_per_second" : 1.272665336202521E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:52", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 80 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 1048576, - "concurrency" : 16, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 140.12463019375, - "ops_per_second" : 7.1365041150674395, - "bytes_per_second" : 7483166.9389609555, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:18:54", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 160 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 10485760, - "concurrency" : 2, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 702.0862186500001, - "ops_per_second" : 1.4243264907304984, - "bytes_per_second" : 1.4935145743442232E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:19:01", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 10485760, - "concurrency" : 4, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 715.780166625, - "ops_per_second" : 1.3970769890358024, - "bytes_per_second" : 1.4649414008552056E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:19:08", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 40 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 10485760, - "concurrency" : 8, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 841.5612348625, - "ops_per_second" : 1.1882676608356215, - "bytes_per_second" : 1.2459889507283727E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:19:17", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 80 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 10485760, - "concurrency" : 16, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 1331.88083618125, - "ops_per_second" : 0.7508179206686282, - "bytes_per_second" : 7872896.519830274, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:19:31", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 160 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 52428800, - "concurrency" : 2, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 3389.8473124999996, - "ops_per_second" : 0.29499853763693673, - "bytes_per_second" : 1.5466419330059428E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:20:05", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 52428800, - "concurrency" : 4, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 3463.6789792249997, - "ops_per_second" : 0.28871035855168964, - "bytes_per_second" : 1.5136737646434825E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:20:41", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 40 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 52428800, - "concurrency" : 8, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 3645.1419333625004, - "ops_per_second" : 0.27433774000606315, - "bytes_per_second" : 1.4383198503229883E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:21:18", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 80 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 52428800, - "concurrency" : 16, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 6639.6078595812505, - "ops_per_second" : 0.15061130433432982, - "bytes_per_second" : 7896369.952683711, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:22:26", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 160 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 104857600, - "concurrency" : 2, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 6830.170477149999, - "ops_per_second" : 0.1464092299519391, - "bytes_per_second" : 1.535212047060845E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:23:36", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 104857600, - "concurrency" : 4, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 7016.660151075, - "ops_per_second" : 0.14251794706728005, - "bytes_per_second" : 1.4944089886402024E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:24:48", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 40 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 104857600, - "concurrency" : 8, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 7251.248158837499, - "ops_per_second" : 0.13790729238541427, - "bytes_per_second" : 1.4460627702032816E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:26:02", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 80 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 104857600, - "concurrency" : 16, - "put_latency_ms" : 0.0, - "get_latency_ms" : 0.0, - "end_to_end_latency_ms" : 13867.87969890625, - "ops_per_second" : 0.0721090766369187, - "bytes_per_second" : 7561184.714363367, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "p50_latency" : 0.0, - "p95_latency" : 0.0, - "p99_latency" : 0.0, - "timestamp" : "2025-09-06 14:28:23", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 160 - } ] -} \ No newline at end of file From 3e82ca0d2483153c2b155896910dc5f77cbb2e78 Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Mon, 8 Sep 2025 16:45:12 -0700 Subject: [PATCH 11/14] auto commit --- .../benchmarks/config/test-scenarios.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/db-esdk-performance-testing/benchmarks/config/test-scenarios.yaml b/db-esdk-performance-testing/benchmarks/config/test-scenarios.yaml index 1fe002ba2..156b6e454 100644 --- a/db-esdk-performance-testing/benchmarks/config/test-scenarios.yaml +++ b/db-esdk-performance-testing/benchmarks/config/test-scenarios.yaml @@ -11,6 +11,7 @@ data_sizes: - 102400 # 100KB - 512000 # 500KB - 1048576 # 1MB + - 10000000 # 10 MB large: - 10485760 # 10MB - 52428800 # 50MB From bf559b72e7e5746995b011526b23ad086221969e Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Mon, 8 Sep 2025 16:50:28 -0700 Subject: [PATCH 12/14] auto commit --- .../raw-data/java_results_10MBdata.json | 851 ++++++++++++++++++ 1 file changed, 851 insertions(+) create mode 100644 db-esdk-performance-testing/benchmarks/results/raw-data/java_results_10MBdata.json diff --git a/db-esdk-performance-testing/benchmarks/results/raw-data/java_results_10MBdata.json b/db-esdk-performance-testing/benchmarks/results/raw-data/java_results_10MBdata.json new file mode 100644 index 000000000..17f0b028e --- /dev/null +++ b/db-esdk-performance-testing/benchmarks/results/raw-data/java_results_10MBdata.json @@ -0,0 +1,851 @@ +{ + "metadata" : { + "language" : "java", + "timestamp" : "2025-09-08 16:47:05", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "total_tests" : 42 + }, + "results" : [ { + "language" : "java", + "test_name" : "throughput", + "data_size" : 1024, + "concurrency" : 1, + "operations_per_second" : 114.43617103987165, + "bytes_per_second" : 117182.63914482857, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 8.738495799999999, + "p50_latency_ms" : 7.87575, + "p95_latency_ms" : 15.502958, + "p99_latency_ms" : 15.502958, + "encrypt_latency_ms" : 3.8807543000000004, + "decrypt_latency_ms" : 4.840279300000001, + "timestamp" : "2025-09-08 16:46:20", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 5120, + "concurrency" : 1, + "operations_per_second" : 142.19374201644348, + "bytes_per_second" : 728031.9591241906, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 7.0326583, + "p50_latency_ms" : 7.044292, + "p95_latency_ms" : 7.397542, + "p99_latency_ms" : 7.397542, + "encrypt_latency_ms" : 3.4365, + "decrypt_latency_ms" : 3.5825332000000003, + "timestamp" : "2025-09-08 16:46:20", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 10240, + "concurrency" : 1, + "operations_per_second" : 152.49646162460093, + "bytes_per_second" : 1561563.7670359134, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 6.5575292, + "p50_latency_ms" : 6.484709, + "p95_latency_ms" : 7.240083, + "p99_latency_ms" : 7.240083, + "encrypt_latency_ms" : 3.2205416999999996, + "decrypt_latency_ms" : 3.3228082, + "timestamp" : "2025-09-08 16:46:20", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 102400, + "concurrency" : 1, + "operations_per_second" : 63.59790777383748, + "bytes_per_second" : 6512425.756040958, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 15.723787699999999, + "p50_latency_ms" : 12.931416, + "p95_latency_ms" : 38.401584, + "p99_latency_ms" : 38.401584, + "encrypt_latency_ms" : 8.52655, + "decrypt_latency_ms" : 7.1710335, + "timestamp" : "2025-09-08 16:46:20", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 512000, + "concurrency" : 1, + "operations_per_second" : 25.28969088006202, + "bytes_per_second" : 1.2948321730591755E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 39.541804, + "p50_latency_ms" : 39.252166, + "p95_latency_ms" : 40.548958, + "p99_latency_ms" : 40.548958, + "encrypt_latency_ms" : 22.0167292, + "decrypt_latency_ms" : 17.469662500000002, + "timestamp" : "2025-09-08 16:46:21", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 1048576, + "concurrency" : 1, + "operations_per_second" : 13.582811844816092, + "bytes_per_second" : 1.4242610512989879E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 73.6224584, + "p50_latency_ms" : 72.973708, + "p95_latency_ms" : 76.11475, + "p99_latency_ms" : 76.11475, + "encrypt_latency_ms" : 41.2115001, + "decrypt_latency_ms" : 32.3443501, + "timestamp" : "2025-09-08 16:46:22", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 10000000, + "concurrency" : 1, + "operations_per_second" : 1.5284864113360808, + "bytes_per_second" : 1.5284864113360807E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 654.2419956, + "p50_latency_ms" : 648.106666, + "p95_latency_ms" : 689.763791, + "p99_latency_ms" : 689.763791, + "encrypt_latency_ms" : 369.118229, + "decrypt_latency_ms" : 284.7368376, + "timestamp" : "2025-09-08 16:46:32", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 1024, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 3.3156280517578125, + "memory_efficiency_ratio" : 2.945331879075718E-4, + "avg_latency_ms" : 0.0, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:33", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 5120, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 2.257843017578125, + "memory_efficiency_ratio" : 0.0021626005271338784, + "avg_latency_ms" : 0.0, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:34", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 10240, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 3.457855224609375, + "memory_efficiency_ratio" : 0.0028241856195998483, + "avg_latency_ms" : 0.0, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:34", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 102400, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 4.816246032714844, + "memory_efficiency_ratio" : 0.02027642469605164, + "avg_latency_ms" : 0.0, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:35", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 512000, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 15.407798767089844, + "memory_efficiency_ratio" : 0.031690526166718906, + "avg_latency_ms" : 0.0, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:36", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 1048576, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 36.92132568359375, + "memory_efficiency_ratio" : 0.02708461794058378, + "avg_latency_ms" : 0.0, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:36", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "memory", + "data_size" : 10000000, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 52.01019287109375, + "memory_efficiency_ratio" : 0.18336296478844313, + "avg_latency_ms" : 0.0, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:40", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 0 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1024, + "concurrency" : 2, + "operations_per_second" : 179.75696750139633, + "bytes_per_second" : 184071.13472142984, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 5.563066699999999, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:40", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1024, + "concurrency" : 4, + "operations_per_second" : 182.44180272971067, + "bytes_per_second" : 186820.40599522373, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 5.48119995, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:40", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1024, + "concurrency" : 8, + "operations_per_second" : 148.7957303124705, + "bytes_per_second" : 152366.8278399698, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 6.720622950000001, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:40", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1024, + "concurrency" : 16, + "operations_per_second" : 138.87402020689902, + "bytes_per_second" : 142206.9966918646, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 7.200770875000001, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:41", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 5120, + "concurrency" : 2, + "operations_per_second" : 168.60835201808936, + "bytes_per_second" : 863274.7623326175, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 5.9309043, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:41", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 5120, + "concurrency" : 4, + "operations_per_second" : 169.1067931382551, + "bytes_per_second" : 865826.7808678662, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 5.913423, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:41", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 5120, + "concurrency" : 8, + "operations_per_second" : 131.33023555075857, + "bytes_per_second" : 672410.8060198838, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 7.6143928, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:41", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 5120, + "concurrency" : 16, + "operations_per_second" : 105.80449559836701, + "bytes_per_second" : 541719.0174636391, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 9.4513942375, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:41", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10240, + "concurrency" : 2, + "operations_per_second" : 163.6512853605628, + "bytes_per_second" : 1675789.1620921632, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 6.1105539, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:42", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10240, + "concurrency" : 4, + "operations_per_second" : 151.44253711318964, + "bytes_per_second" : 1550771.580039062, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 6.6031645999999995, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:42", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10240, + "concurrency" : 8, + "operations_per_second" : 129.70191617038958, + "bytes_per_second" : 1328147.6215847894, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 7.709986325, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:42", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10240, + "concurrency" : 16, + "operations_per_second" : 78.00538278289041, + "bytes_per_second" : 798775.1196967978, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 12.8196281375, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:42", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 102400, + "concurrency" : 2, + "operations_per_second" : 77.9955140412126, + "bytes_per_second" : 7986740.63782017, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 12.8212502, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:42", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 102400, + "concurrency" : 4, + "operations_per_second" : 75.83197209256029, + "bytes_per_second" : 7765193.942278174, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 13.1870499, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:42", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 102400, + "concurrency" : 8, + "operations_per_second" : 68.21811219428038, + "bytes_per_second" : 6985534.688694311, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 14.658863575000002, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:43", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 102400, + "concurrency" : 16, + "operations_per_second" : 47.46238907645142, + "bytes_per_second" : 4860148.641428626, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 21.06931445, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:43", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 512000, + "concurrency" : 2, + "operations_per_second" : 24.597117237045566, + "bytes_per_second" : 1.259372402536733E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 40.6551707, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:43", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 512000, + "concurrency" : 4, + "operations_per_second" : 24.22039219935766, + "bytes_per_second" : 1.2400840806071123E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 41.287523, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:43", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 512000, + "concurrency" : 8, + "operations_per_second" : 21.207543374301284, + "bytes_per_second" : 1.0858262207642257E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 47.15303335, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:44", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 512000, + "concurrency" : 16, + "operations_per_second" : 12.701903282243414, + "bytes_per_second" : 6503374.480508628, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 78.728358875, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:44", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1048576, + "concurrency" : 2, + "operations_per_second" : 13.398087074183973, + "bytes_per_second" : 1.4048912551899534E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 74.63752059999999, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:45", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1048576, + "concurrency" : 4, + "operations_per_second" : 13.02752980594925, + "bytes_per_second" : 1.366035509380304E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 76.7605229, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:45", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1048576, + "concurrency" : 8, + "operations_per_second" : 11.442604144627765, + "bytes_per_second" : 1.1998440083557203E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 87.392693775, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:46", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 1048576, + "concurrency" : 16, + "operations_per_second" : 6.566227623799001, + "bytes_per_second" : 6885188.696852662, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 152.2944462625, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:47", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10000000, + "concurrency" : 2, + "operations_per_second" : 1.5271685382817055, + "bytes_per_second" : 1.5271685382817056E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 654.806575, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:50", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10000000, + "concurrency" : 4, + "operations_per_second" : 1.4978267092763307, + "bytes_per_second" : 1.4978267092763307E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 667.63397515, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:54", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 20 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10000000, + "concurrency" : 8, + "operations_per_second" : 1.3425611721051591, + "bytes_per_second" : 1.342561172105159E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 744.8450177, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:46:58", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 40 + }, { + "language" : "java", + "test_name" : "concurrent", + "data_size" : 10000000, + "concurrency" : 16, + "operations_per_second" : 0.7310966037322482, + "bytes_per_second" : 7310966.037322481, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 1367.8082963250001, + "p50_latency_ms" : 0.0, + "p95_latency_ms" : 0.0, + "p99_latency_ms" : 0.0, + "encrypt_latency_ms" : 0.0, + "decrypt_latency_ms" : 0.0, + "timestamp" : "2025-09-08 16:47:05", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 80 + } ] +} \ No newline at end of file From e2a5e144f0886154d2abc2a9922968cc9222c0e6 Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Mon, 8 Sep 2025 17:44:10 -0700 Subject: [PATCH 13/14] auto commit --- .../benchmarks/config/test-scenarios.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/db-esdk-performance-testing/benchmarks/config/test-scenarios.yaml b/db-esdk-performance-testing/benchmarks/config/test-scenarios.yaml index 156b6e454..c893a3587 100644 --- a/db-esdk-performance-testing/benchmarks/config/test-scenarios.yaml +++ b/db-esdk-performance-testing/benchmarks/config/test-scenarios.yaml @@ -15,6 +15,7 @@ data_sizes: large: - 10485760 # 10MB - 52428800 # 50MB + - 100000000 - 104857600 # 100MB # Quick test configuration (reduced test set for faster execution) From dbcf6ffd7c325684d85812543f8650925dd34b32 Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Tue, 9 Sep 2025 12:10:35 -0700 Subject: [PATCH 14/14] auto commit --- .../results/raw-data/java_results.json | 980 +++--------------- 1 file changed, 170 insertions(+), 810 deletions(-) diff --git a/db-esdk-performance-testing/benchmarks/results/raw-data/java_results.json b/db-esdk-performance-testing/benchmarks/results/raw-data/java_results.json index a4196239d..8f13d7b52 100644 --- a/db-esdk-performance-testing/benchmarks/results/raw-data/java_results.json +++ b/db-esdk-performance-testing/benchmarks/results/raw-data/java_results.json @@ -1,28 +1,28 @@ { "metadata" : { "language" : "java", - "timestamp" : "2025-09-08 11:55:39", + "timestamp" : "2025-09-09 12:09:07", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, - "total_tests" : 54 + "total_tests" : 22 }, "results" : [ { "language" : "java", "test_name" : "throughput", "data_size" : 1024, "concurrency" : 1, - "operations_per_second" : 115.0451198907053, - "bytes_per_second" : 117806.20276808222, + "operations_per_second" : 124.68011757335088, + "bytes_per_second" : 127672.4403951113, "peak_memory_mb" : 0.0, "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 8.6922418, - "p50_latency_ms" : 7.8825, - "p95_latency_ms" : 14.78225, - "p99_latency_ms" : 14.78225, - "encrypt_latency_ms" : 3.9275998999999997, - "decrypt_latency_ms" : 4.7478499, - "timestamp" : "2025-09-08 11:46:45", + "avg_latency_ms" : 8.020525, + "p50_latency_ms" : 7.118834, + "p95_latency_ms" : 14.138417, + "p99_latency_ms" : 14.138417, + "encrypt_latency_ms" : 3.6590665, + "decrypt_latency_ms" : 4.3440709, + "timestamp" : "2025-09-09 12:02:56", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, @@ -32,17 +32,17 @@ "test_name" : "throughput", "data_size" : 5120, "concurrency" : 1, - "operations_per_second" : 143.8708341462635, - "bytes_per_second" : 736618.6708288691, + "operations_per_second" : 150.10197778268576, + "bytes_per_second" : 768522.126247351, "peak_memory_mb" : 0.0, "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 6.950679099999999, - "p50_latency_ms" : 6.874625, - "p95_latency_ms" : 7.555458, - "p99_latency_ms" : 7.555458, - "encrypt_latency_ms" : 3.4125791999999997, - "decrypt_latency_ms" : 3.5264916, - "timestamp" : "2025-09-08 11:46:45", + "avg_latency_ms" : 6.662137400000001, + "p50_latency_ms" : 6.507416, + "p95_latency_ms" : 7.470375, + "p99_latency_ms" : 7.470375, + "encrypt_latency_ms" : 3.3877333999999997, + "decrypt_latency_ms" : 3.2609667, + "timestamp" : "2025-09-09 12:02:56", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, @@ -52,17 +52,17 @@ "test_name" : "throughput", "data_size" : 10240, "concurrency" : 1, - "operations_per_second" : 155.5157590728088, - "bytes_per_second" : 1592481.3729055622, + "operations_per_second" : 160.71722827453837, + "bytes_per_second" : 1645744.4175312729, "peak_memory_mb" : 0.0, "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 6.4302165, - "p50_latency_ms" : 6.281583, - "p95_latency_ms" : 7.201583, - "p99_latency_ms" : 7.201583, - "encrypt_latency_ms" : 3.1387957, - "decrypt_latency_ms" : 3.2792123, - "timestamp" : "2025-09-08 11:46:45", + "avg_latency_ms" : 6.2221083, + "p50_latency_ms" : 6.159917, + "p95_latency_ms" : 6.624958, + "p99_latency_ms" : 6.624958, + "encrypt_latency_ms" : 3.1598876000000002, + "decrypt_latency_ms" : 3.0491501, + "timestamp" : "2025-09-09 12:02:56", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, @@ -72,17 +72,17 @@ "test_name" : "throughput", "data_size" : 102400, "concurrency" : 1, - "operations_per_second" : 79.32329235830495, - "bytes_per_second" : 8122705.137490427, + "operations_per_second" : 85.80953331558563, + "bytes_per_second" : 8786896.211515969, "peak_memory_mb" : 0.0, "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 12.6066376, - "p50_latency_ms" : 12.51525, - "p95_latency_ms" : 13.038959, - "p99_latency_ms" : 13.038959, - "encrypt_latency_ms" : 6.6231543, - "decrypt_latency_ms" : 5.9605042, - "timestamp" : "2025-09-08 11:46:45", + "avg_latency_ms" : 11.653716800000002, + "p50_latency_ms" : 11.60425, + "p95_latency_ms" : 12.147792, + "p99_latency_ms" : 12.147792, + "encrypt_latency_ms" : 6.3010252, + "decrypt_latency_ms" : 5.3375958, + "timestamp" : "2025-09-09 12:02:56", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, @@ -92,17 +92,17 @@ "test_name" : "throughput", "data_size" : 512000, "concurrency" : 1, - "operations_per_second" : 25.50681245639674, - "bytes_per_second" : 1.305948797767513E7, + "operations_per_second" : 25.967202535119814, + "bytes_per_second" : 1.3295207697981345E7, "peak_memory_mb" : 0.0, "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 39.2052124, - "p50_latency_ms" : 38.225042, - "p95_latency_ms" : 44.972083, - "p99_latency_ms" : 44.972083, - "encrypt_latency_ms" : 21.9098082, - "decrypt_latency_ms" : 17.2458585, - "timestamp" : "2025-09-08 11:46:46", + "avg_latency_ms" : 38.510116700000005, + "p50_latency_ms" : 38.376625, + "p95_latency_ms" : 39.801, + "p99_latency_ms" : 39.801, + "encrypt_latency_ms" : 21.3460708, + "decrypt_latency_ms" : 17.1229875, + "timestamp" : "2025-09-09 12:02:57", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, @@ -112,17 +112,37 @@ "test_name" : "throughput", "data_size" : 1048576, "concurrency" : 1, - "operations_per_second" : 13.961656753017767, - "bytes_per_second" : 1.4639858191452358E7, + "operations_per_second" : 12.474584313106936, + "bytes_per_second" : 1.3080549720700419E7, "peak_memory_mb" : 0.0, "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 71.62473750000001, - "p50_latency_ms" : 71.51675, - "p95_latency_ms" : 72.820375, - "p99_latency_ms" : 72.820375, - "encrypt_latency_ms" : 40.0376915, - "decrypt_latency_ms" : 31.5381958, - "timestamp" : "2025-09-08 11:46:47", + "avg_latency_ms" : 80.1629918, + "p50_latency_ms" : 74.872917, + "p95_latency_ms" : 97.101375, + "p99_latency_ms" : 97.101375, + "encrypt_latency_ms" : 43.5257208, + "decrypt_latency_ms" : 36.5108709, + "timestamp" : "2025-09-09 12:02:58", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 10000000, + "concurrency" : 1, + "operations_per_second" : 1.5477552230482363, + "bytes_per_second" : 1.5477552230482364E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 646.0969959, + "p50_latency_ms" : 642.796542, + "p95_latency_ms" : 678.216167, + "p99_latency_ms" : 678.216167, + "encrypt_latency_ms" : 360.73167520000004, + "decrypt_latency_ms" : 285.0051416, + "timestamp" : "2025-09-09 12:03:08", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, @@ -132,17 +152,17 @@ "test_name" : "throughput", "data_size" : 10485760, "concurrency" : 1, - "operations_per_second" : 1.5027615971107828, - "bytes_per_second" : 1.5757597444520362E7, + "operations_per_second" : 1.4945977297250002, + "bytes_per_second" : 1.5671993090441218E7, "peak_memory_mb" : 0.0, "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 665.4415457, - "p50_latency_ms" : 665.21775, - "p95_latency_ms" : 668.471125, - "p99_latency_ms" : 668.471125, - "encrypt_latency_ms" : 374.6874331, - "decrypt_latency_ms" : 290.3426126, - "timestamp" : "2025-09-08 11:46:57", + "avg_latency_ms" : 669.0763542, + "p50_latency_ms" : 667.506375, + "p95_latency_ms" : 682.568083, + "p99_latency_ms" : 682.568083, + "encrypt_latency_ms" : 374.82977500000004, + "decrypt_latency_ms" : 293.89182489999996, + "timestamp" : "2025-09-09 12:03:18", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, @@ -152,17 +172,37 @@ "test_name" : "throughput", "data_size" : 52428800, "concurrency" : 1, - "operations_per_second" : 0.29788644207688386, - "bytes_per_second" : 1.5617828694360528E7, + "operations_per_second" : 0.2992430474929217, + "bytes_per_second" : 1.5688953888396893E7, "peak_memory_mb" : 0.0, "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 3356.9839332999995, - "p50_latency_ms" : 3345.4625, - "p95_latency_ms" : 3409.787, - "p99_latency_ms" : 3409.787, - "encrypt_latency_ms" : 1878.5476334999998, - "decrypt_latency_ms" : 1475.6690290000001, - "timestamp" : "2025-09-08 11:47:48", + "avg_latency_ms" : 3341.7651918, + "p50_latency_ms" : 3338.38875, + "p95_latency_ms" : 3427.230292, + "p99_latency_ms" : 3427.230292, + "encrypt_latency_ms" : 1880.0336415000002, + "decrypt_latency_ms" : 1459.0504125, + "timestamp" : "2025-09-09 12:04:09", + "java_version" : "17.0.16", + "cpu_count" : 10, + "total_memory_gb" : 8.0, + "iterations" : 10 + }, { + "language" : "java", + "test_name" : "throughput", + "data_size" : 100000000, + "concurrency" : 1, + "operations_per_second" : 0.15802778407148096, + "bytes_per_second" : 1.5802778407148097E7, + "peak_memory_mb" : 0.0, + "memory_efficiency_ratio" : 0.0, + "avg_latency_ms" : 6328.0011542, + "p50_latency_ms" : 6310.039834, + "p95_latency_ms" : 6440.9085, + "p99_latency_ms" : 6440.9085, + "encrypt_latency_ms" : 3563.6736251, + "decrypt_latency_ms" : 2761.5854582, + "timestamp" : "2025-09-09 12:05:46", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, @@ -172,17 +212,17 @@ "test_name" : "throughput", "data_size" : 104857600, "concurrency" : 1, - "operations_per_second" : 0.14872135089533312, - "bytes_per_second" : 1.5594563923642483E7, + "operations_per_second" : 0.14976087811631936, + "bytes_per_second" : 1.570356625316977E7, "peak_memory_mb" : 0.0, "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 6723.9841084, - "p50_latency_ms" : 6730.469416, - "p95_latency_ms" : 6816.788042, - "p99_latency_ms" : 6816.788042, - "encrypt_latency_ms" : 3789.1793335, - "decrypt_latency_ms" : 2930.9112166, - "timestamp" : "2025-09-08 11:49:31", + "avg_latency_ms" : 6677.311275, + "p50_latency_ms" : 6664.984958, + "p95_latency_ms" : 6770.083792, + "p99_latency_ms" : 6770.083792, + "encrypt_latency_ms" : 3757.9571707000005, + "decrypt_latency_ms" : 2916.5672417, + "timestamp" : "2025-09-09 12:07:27", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, @@ -194,15 +234,15 @@ "concurrency" : 1, "operations_per_second" : 0.0, "bytes_per_second" : 0.0, - "peak_memory_mb" : 3.4590606689453125, - "memory_efficiency_ratio" : 2.8232014221877167E-4, + "peak_memory_mb" : 3.51812744140625, + "memory_efficiency_ratio" : 2.775801946531115E-4, "avg_latency_ms" : 0.0, "p50_latency_ms" : 0.0, "p95_latency_ms" : 0.0, "p99_latency_ms" : 0.0, "encrypt_latency_ms" : 0.0, "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:49:32", + "timestamp" : "2025-09-09 12:07:28", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, @@ -214,15 +254,15 @@ "concurrency" : 1, "operations_per_second" : 0.0, "bytes_per_second" : 0.0, - "peak_memory_mb" : 3.4590530395507812, - "memory_efficiency_ratio" : 0.001411603824564112, + "peak_memory_mb" : 4.0543975830078125, + "memory_efficiency_ratio" : 0.0012043250322721474, "avg_latency_ms" : 0.0, "p50_latency_ms" : 0.0, "p95_latency_ms" : 0.0, "p99_latency_ms" : 0.0, "encrypt_latency_ms" : 0.0, "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:49:33", + "timestamp" : "2025-09-09 12:07:29", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, @@ -234,15 +274,15 @@ "concurrency" : 1, "operations_per_second" : 0.0, "bytes_per_second" : 0.0, - "peak_memory_mb" : 3.3278121948242188, - "memory_efficiency_ratio" : 0.002934548113979683, + "peak_memory_mb" : 3.2662124633789062, + "memory_efficiency_ratio" : 0.0029898927609557377, "avg_latency_ms" : 0.0, "p50_latency_ms" : 0.0, "p95_latency_ms" : 0.0, "p99_latency_ms" : 0.0, "encrypt_latency_ms" : 0.0, "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:49:33", + "timestamp" : "2025-09-09 12:07:29", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, @@ -254,15 +294,15 @@ "concurrency" : 1, "operations_per_second" : 0.0, "bytes_per_second" : 0.0, - "peak_memory_mb" : 5.15667724609375, - "memory_efficiency_ratio" : 0.01893782475410418, + "peak_memory_mb" : 5.965385437011719, + "memory_efficiency_ratio" : 0.016370484527973704, "avg_latency_ms" : 0.0, "p50_latency_ms" : 0.0, "p95_latency_ms" : 0.0, "p99_latency_ms" : 0.0, "encrypt_latency_ms" : 0.0, "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:49:34", + "timestamp" : "2025-09-09 12:07:30", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, @@ -274,15 +314,15 @@ "concurrency" : 1, "operations_per_second" : 0.0, "bytes_per_second" : 0.0, - "peak_memory_mb" : 15.132316589355469, - "memory_efficiency_ratio" : 0.03226744874895572, + "peak_memory_mb" : 16.054359436035156, + "memory_efficiency_ratio" : 0.03041424679355427, "avg_latency_ms" : 0.0, "p50_latency_ms" : 0.0, "p95_latency_ms" : 0.0, "p99_latency_ms" : 0.0, "encrypt_latency_ms" : 0.0, "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:49:35", + "timestamp" : "2025-09-09 12:07:31", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, @@ -302,7 +342,7 @@ "p99_latency_ms" : 0.0, "encrypt_latency_ms" : 0.0, "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:49:36", + "timestamp" : "2025-09-09 12:07:31", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, @@ -310,19 +350,19 @@ }, { "language" : "java", "test_name" : "memory", - "data_size" : 10485760, + "data_size" : 10000000, "concurrency" : 1, "operations_per_second" : 0.0, "bytes_per_second" : 0.0, - "peak_memory_mb" : 52.01019287109375, - "memory_efficiency_ratio" : 0.19227000416600656, + "peak_memory_mb" : 52.008575439453125, + "memory_efficiency_ratio" : 0.18336866725305523, "avg_latency_ms" : 0.0, "p50_latency_ms" : 0.0, "p95_latency_ms" : 0.0, "p99_latency_ms" : 0.0, "encrypt_latency_ms" : 0.0, "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:49:39", + "timestamp" : "2025-09-09 12:07:35", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, @@ -330,19 +370,19 @@ }, { "language" : "java", "test_name" : "memory", - "data_size" : 52428800, + "data_size" : 10485760, "concurrency" : 1, "operations_per_second" : 0.0, "bytes_per_second" : 0.0, - "peak_memory_mb" : 211.35906219482422, - "memory_efficiency_ratio" : 0.23656425932620553, + "peak_memory_mb" : 51.10216522216797, + "memory_efficiency_ratio" : 0.1956864245678191, "avg_latency_ms" : 0.0, "p50_latency_ms" : 0.0, "p95_latency_ms" : 0.0, "p99_latency_ms" : 0.0, "encrypt_latency_ms" : 0.0, "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:49:57", + "timestamp" : "2025-09-09 12:07:39", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, @@ -350,742 +390,62 @@ }, { "language" : "java", "test_name" : "memory", - "data_size" : 104857600, + "data_size" : 52428800, "concurrency" : 1, "operations_per_second" : 0.0, "bytes_per_second" : 0.0, - "peak_memory_mb" : 419.2744369506836, - "memory_efficiency_ratio" : 0.23850726680902398, + "peak_memory_mb" : 212.0059051513672, + "memory_efficiency_ratio" : 0.2358424873321391, "avg_latency_ms" : 0.0, "p50_latency_ms" : 0.0, "p95_latency_ms" : 0.0, "p99_latency_ms" : 0.0, "encrypt_latency_ms" : 0.0, "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:33", + "timestamp" : "2025-09-09 12:07:57", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, "iterations" : 0 }, { "language" : "java", - "test_name" : "concurrent", - "data_size" : 1024, - "concurrency" : 2, - "operations_per_second" : 179.75171363150534, - "bytes_per_second" : 184065.75475866147, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 5.563229300000001, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:34", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 1024, - "concurrency" : 4, - "operations_per_second" : 156.38164402270888, - "bytes_per_second" : 160134.8034792539, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 6.3946124, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:34", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 1024, - "concurrency" : 8, - "operations_per_second" : 125.57271241921629, - "bytes_per_second" : 128586.45751727748, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 7.963513575, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:34", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 40 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 1024, - "concurrency" : 16, - "operations_per_second" : 109.29949669754097, - "bytes_per_second" : 111922.68461828196, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 9.1491729625, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:34", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 80 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 5120, - "concurrency" : 2, - "operations_per_second" : 163.98752592806773, - "bytes_per_second" : 839616.1327517068, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 6.0980248, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:34", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 5120, - "concurrency" : 4, - "operations_per_second" : 140.20300876918645, - "bytes_per_second" : 717839.4048982346, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 7.132514550000001, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:34", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 5120, - "concurrency" : 8, - "operations_per_second" : 119.00508783344551, - "bytes_per_second" : 609306.049707241, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 8.403002075, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:35", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 40 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 5120, - "concurrency" : 16, - "operations_per_second" : 71.57089052780145, - "bytes_per_second" : 366442.95950234344, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 13.972160925, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:35", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 80 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 10240, - "concurrency" : 2, - "operations_per_second" : 158.46678693028062, - "bytes_per_second" : 1622699.8981660735, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 6.3104706, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:35", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 10240, - "concurrency" : 4, - "operations_per_second" : 142.06441631090718, - "bytes_per_second" : 1454739.6230236895, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 7.03906035, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:35", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 10240, - "concurrency" : 8, - "operations_per_second" : 112.89122542366842, - "bytes_per_second" : 1156006.1483383647, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 8.858084375, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:35", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 40 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 10240, - "concurrency" : 16, - "operations_per_second" : 112.19235228461446, - "bytes_per_second" : 1148849.687394452, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 8.913263512499999, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:36", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 80 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 102400, - "concurrency" : 2, - "operations_per_second" : 74.1860857215621, - "bytes_per_second" : 7596655.1778879585, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 13.4796167, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:36", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 102400, - "concurrency" : 4, - "operations_per_second" : 65.68432992521649, - "bytes_per_second" : 6726075.384342168, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 15.2243313, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:36", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 102400, - "concurrency" : 8, - "operations_per_second" : 57.45536995059531, - "bytes_per_second" : 5883429.88294096, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 17.404813525, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:36", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 40 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 102400, - "concurrency" : 16, - "operations_per_second" : 42.34140567892608, - "bytes_per_second" : 4335759.94152203, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 23.617543724999997, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:36", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 80 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 512000, - "concurrency" : 2, - "operations_per_second" : 21.127508179599303, - "bytes_per_second" : 1.0817284187954843E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 47.331658399999995, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:37", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 512000, - "concurrency" : 4, - "operations_per_second" : 22.39972864789518, - "bytes_per_second" : 1.1468661067722332E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 44.64339795, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:37", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 512000, - "concurrency" : 8, - "operations_per_second" : 16.69883656479568, - "bytes_per_second" : 8549804.321175389, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 59.884411475, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:37", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 40 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 512000, - "concurrency" : 16, - "operations_per_second" : 11.670848738304166, - "bytes_per_second" : 5975474.554011733, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 85.6835713, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:38", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 80 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 1048576, - "concurrency" : 2, - "operations_per_second" : 12.987509177331141, - "bytes_per_second" : 1.3618390423129179E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 76.9970582, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:39", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 1048576, - "concurrency" : 4, - "operations_per_second" : 12.91239814930342, - "bytes_per_second" : 1.3539630801803984E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 77.44494775, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:39", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 1048576, - "concurrency" : 8, - "operations_per_second" : 10.917783209385842, - "bytes_per_second" : 1.1448125446564969E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 91.59368535, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:40", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 40 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 1048576, - "concurrency" : 16, - "operations_per_second" : 6.155327672561361, - "bytes_per_second" : 6454328.869583702, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 162.4608880625, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:41", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 80 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 10485760, - "concurrency" : 2, - "operations_per_second" : 1.3674876283055815, - "bytes_per_second" : 1.4339147073381534E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 731.2680417, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:44", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 10485760, - "concurrency" : 4, - "operations_per_second" : 1.4272412226250475, - "bytes_per_second" : 1.4965708922552818E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 700.6524084, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:48", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 10485760, - "concurrency" : 8, - "operations_per_second" : 1.2630863706628956, - "bytes_per_second" : 1.3244420542042164E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 791.711495925, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:50:53", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 40 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 10485760, - "concurrency" : 16, - "operations_per_second" : 0.695257000414006, - "bytes_per_second" : 7290298.044661167, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 1438.317053125, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:51:00", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 80 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 52428800, - "concurrency" : 2, - "operations_per_second" : 0.2898646061358695, - "bytes_per_second" : 1.5197253462176275E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 3449.8865292, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:51:18", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 52428800, - "concurrency" : 4, - "operations_per_second" : 0.2868660356107121, - "bytes_per_second" : 1.5040042007826904E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 3485.9477103, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:51:37", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 52428800, - "concurrency" : 8, - "operations_per_second" : 0.2757878797339764, - "bytes_per_second" : 1.4459227588996701E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 3625.975155125, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:51:56", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 40 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 52428800, - "concurrency" : 16, - "operations_per_second" : 0.1436821204142847, - "bytes_per_second" : 7533081.154776449, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 6959.808201025, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:52:32", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 80 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 104857600, - "concurrency" : 2, - "operations_per_second" : 0.1468282540478687, - "bytes_per_second" : 1.5396058331649797E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 6810.678275, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:53:07", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 10 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 104857600, - "concurrency" : 4, - "operations_per_second" : 0.14162462338136642, - "bytes_per_second" : 1.4850418108673967E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 7060.9190416500005, - "p50_latency_ms" : 0.0, - "p95_latency_ms" : 0.0, - "p99_latency_ms" : 0.0, - "encrypt_latency_ms" : 0.0, - "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:53:44", - "java_version" : "17.0.16", - "cpu_count" : 10, - "total_memory_gb" : 8.0, - "iterations" : 20 - }, { - "language" : "java", - "test_name" : "concurrent", - "data_size" : 104857600, - "concurrency" : 8, - "operations_per_second" : 0.13455770234792894, - "bytes_per_second" : 1.4109397729718193E7, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 7431.755912525, + "test_name" : "memory", + "data_size" : 100000000, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 388.0062561035156, + "memory_efficiency_ratio" : 0.24578838650267038, + "avg_latency_ms" : 0.0, "p50_latency_ms" : 0.0, "p95_latency_ms" : 0.0, "p99_latency_ms" : 0.0, "encrypt_latency_ms" : 0.0, "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:54:23", + "timestamp" : "2025-09-09 12:08:31", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, - "iterations" : 40 + "iterations" : 0 }, { "language" : "java", - "test_name" : "concurrent", + "test_name" : "memory", "data_size" : 104857600, - "concurrency" : 16, - "operations_per_second" : 0.0672335755582277, - "bytes_per_second" : 7049951.372454417, - "peak_memory_mb" : 0.0, - "memory_efficiency_ratio" : 0.0, - "avg_latency_ms" : 14873.5210301875, + "concurrency" : 1, + "operations_per_second" : 0.0, + "bytes_per_second" : 0.0, + "peak_memory_mb" : 419.98480224609375, + "memory_efficiency_ratio" : 0.23810385391375216, + "avg_latency_ms" : 0.0, "p50_latency_ms" : 0.0, "p95_latency_ms" : 0.0, "p99_latency_ms" : 0.0, "encrypt_latency_ms" : 0.0, "decrypt_latency_ms" : 0.0, - "timestamp" : "2025-09-08 11:55:39", + "timestamp" : "2025-09-09 12:09:07", "java_version" : "17.0.16", "cpu_count" : 10, "total_memory_gb" : 8.0, - "iterations" : 80 + "iterations" : 0 } ] } \ No newline at end of file