You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ducktape/README.md
+46-14Lines changed: 46 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,8 @@ Ducktape-based producer tests for the Confluent Kafka Python client with compreh
5
5
## Prerequisites
6
6
7
7
-`pip install ducktape confluent-kafka psutil`
8
-
- Kafka running on `localhost:9092`
8
+
- Kafka running on `localhost:9092` (PLAINTEXT listener - ducktape tests use the simple port)
9
+
- Schema Registry running on `localhost:8081` (uses `host.docker.internal:29092` for Kafka connection)
9
10
10
11
## Running Tests
11
12
@@ -40,29 +41,60 @@ Every test automatically includes:
40
41
41
42
## Configuration
42
43
43
-
Performance bounds are loaded from a JSON config file. By default, it loads `benchmark_bounds.json`, but you can override this with the `BENCHMARK_BOUNDS_CONFIG` environment variable:
44
+
Performance bounds are loaded from an environment-based JSON config file. By default, it loads `benchmark_bounds.json`, but you can override this with the `BENCHMARK_BOUNDS_CONFIG` environment variable.
45
+
46
+
### Environment-Based Configuration
47
+
48
+
The bounds configuration supports different environments with different performance thresholds:
44
49
45
50
```json
46
51
{
47
-
"min_throughput_msg_per_sec": 1500.0,
48
-
"max_p95_latency_ms": 1500.0,
49
-
"max_error_rate": 0.01,
50
-
"min_success_rate": 0.99,
51
-
"max_p99_latency_ms": 2500.0,
52
-
"max_memory_growth_mb": 600.0,
53
-
"max_buffer_full_rate": 0.03,
54
-
"min_messages_per_poll": 15.0
52
+
"_comment": "Performance bounds for benchmark tests by environment",
53
+
"local": {
54
+
"_comment": "Default bounds for local development - more relaxed thresholds",
55
+
"min_throughput_msg_per_sec": 1000.0,
56
+
"max_p95_latency_ms": 2000.0,
57
+
"max_error_rate": 0.02,
58
+
"min_success_rate": 0.98,
59
+
"max_p99_latency_ms": 3000.0,
60
+
"max_memory_growth_mb": 800.0,
61
+
"max_buffer_full_rate": 0.05,
62
+
"min_messages_per_poll": 10.0
63
+
},
64
+
"ci": {
65
+
"_comment": "Stricter bounds for CI environment - production-like requirements",
66
+
"min_throughput_msg_per_sec": 1500.0,
67
+
"max_p95_latency_ms": 1500.0,
68
+
"max_error_rate": 0.01,
69
+
"min_success_rate": 0.99,
70
+
"max_p99_latency_ms": 2500.0,
71
+
"max_memory_growth_mb": 600.0,
72
+
"max_buffer_full_rate": 0.03,
73
+
"min_messages_per_poll": 15.0
74
+
},
75
+
"_default_environment": "local"
55
76
}
56
77
```
57
78
79
+
### Environment Selection
80
+
81
+
-**BENCHMARK_ENVIRONMENT**: Selects which environment bounds to use (`local`, `ci`, etc.)
82
+
-**Default**: Uses "local" environment if not specified
83
+
-**CI**: Automatically uses "ci" environment in CI pipelines
84
+
58
85
Usage:
59
86
```bash
60
-
# Use default config file
87
+
# Use default environment (local)
61
88
./run_ducktape_test.py
62
89
63
-
# Use different configs for different environments
0 commit comments