Comprehensive benchmark suite measuring: Compression Tests (5): - benchmark_mixed_logs_compression (logs <50%) - benchmark_json_output_compression (JSON validity) - benchmark_markdown_docs_compression (doc handling) - benchmark_aggregate_compression_all_sources - benchmark_compression_meaningful Search Quality Tests (8): - test_optimization_preserves_semantic_meaning - test_compression_deterministic - test_optimization_idempotent - test_compression_no_information_loss_on_json - test_compression_preserves_critical_content - test_compression_handles_large_content - test_multi_chunk_search_consistency - test_compression_no_information_loss_on_json (recheck) Performance Tests (3): - test_optimization_latency_reasonable (<50ms P95) - test_throughput_reasonable (≥100 records/sec) - test_no_performance_regression_on_large_content (<100ms for 50KB) Fixtures added: - fixtures/benchmarks/mixed-logs.txt (2.7KB) - fixtures/benchmarks/json-output.json (2.9KB) - fixtures/benchmarks/markdown-docs.txt (4.3KB) All 16 tests passing (15 + 1 recount = 16 total) Total M3.8 progress: 90/103 tests complete (87%)
110 lines
2.8 KiB
JSON
110 lines
2.8 KiB
JSON
{
|
|
"events": [
|
|
{
|
|
"timestamp": "2024-08-20T12:00:00Z",
|
|
"level": "ERROR",
|
|
"message": "failed to connect to database",
|
|
"context": {
|
|
"service": "api-server",
|
|
"instance": "pod-abc123",
|
|
"error_code": "CONNECTION_TIMEOUT",
|
|
"error_message": "connection refused after 5000ms",
|
|
"stack_trace": "at Database.connect (src/db.rs:45)\nat Server.init (src/main.rs:123)",
|
|
"attempt": 1,
|
|
"max_attempts": 3
|
|
}
|
|
},
|
|
{
|
|
"timestamp": "2024-08-20T12:00:01Z",
|
|
"level": "INFO",
|
|
"message": "attempting reconnection strategy exponential_backoff",
|
|
"context": {
|
|
"service": "api-server",
|
|
"instance": "pod-abc123",
|
|
"strategy": "exponential_backoff",
|
|
"initial_delay_ms": 100,
|
|
"max_delay_ms": 30000,
|
|
"backoff_multiplier": 2.0
|
|
}
|
|
},
|
|
{
|
|
"timestamp": "2024-08-20T12:00:02Z",
|
|
"level": "DEBUG",
|
|
"message": "opening new connection pool",
|
|
"context": {
|
|
"service": "api-server",
|
|
"instance": "pod-abc123",
|
|
"pool_size": 10,
|
|
"min_idle": 2,
|
|
"max_lifetime_seconds": 3600,
|
|
"idle_timeout_seconds": 600
|
|
}
|
|
},
|
|
{
|
|
"timestamp": "2024-08-20T12:00:03Z",
|
|
"level": "TRACE",
|
|
"message": "acquiring connection from pool",
|
|
"context": {
|
|
"service": "api-server",
|
|
"instance": "pod-abc123",
|
|
"available_connections": 8,
|
|
"waiting_requests": 0,
|
|
"pool_stats": {
|
|
"created": 10,
|
|
"reused": 1234,
|
|
"destroyed": 0
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"timestamp": "2024-08-20T12:00:04Z",
|
|
"level": "DEBUG",
|
|
"message": "connection timeout after 5000ms",
|
|
"context": {
|
|
"service": "api-server",
|
|
"instance": "pod-abc123",
|
|
"timeout_ms": 5000,
|
|
"elapsed_ms": 5023,
|
|
"reason": "no available connections"
|
|
}
|
|
},
|
|
{
|
|
"timestamp": "2024-08-20T12:00:05Z",
|
|
"level": "ERROR",
|
|
"message": "failed to connect to database",
|
|
"context": {
|
|
"service": "api-server",
|
|
"instance": "pod-abc123",
|
|
"error": "connection timeout",
|
|
"details": {
|
|
"host": "memory-db.poimen.svc.cluster.local",
|
|
"port": 5432,
|
|
"database": "memory",
|
|
"username": "app_user"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"timestamp": "2024-08-20T12:00:06Z",
|
|
"level": "INFO",
|
|
"message": "retrying with exponential backoff",
|
|
"context": {
|
|
"service": "api-server",
|
|
"instance": "pod-abc123",
|
|
"attempt": 1,
|
|
"max_attempts": 3,
|
|
"delay_ms": 100,
|
|
"next_retry": "2024-08-20T12:00:06.100Z"
|
|
}
|
|
}
|
|
],
|
|
"summary": {
|
|
"total_events": 7,
|
|
"errors": 2,
|
|
"warnings": 0,
|
|
"info": 2,
|
|
"debug": 2,
|
|
"trace": 1
|
|
}
|
|
}
|