mq-bridge-py 0.2.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mq_bridge_py-0.2.16/.github/ISSUE_TEMPLATE/bug_report.md +51 -0
- mq_bridge_py-0.2.16/.github/ISSUE_TEMPLATE/feature_request.md +36 -0
- mq_bridge_py-0.2.16/.github/PULL_REQUEST_TEMPLATE.md +42 -0
- mq_bridge_py-0.2.16/.github/workflows/benchmark.yml +106 -0
- mq_bridge_py-0.2.16/.github/workflows/ci.yml +283 -0
- mq_bridge_py-0.2.16/.github/workflows/ibm-mq.yml +187 -0
- mq_bridge_py-0.2.16/.github/workflows/publish-python.yml +215 -0
- mq_bridge_py-0.2.16/.github/workflows/python.yml +69 -0
- mq_bridge_py-0.2.16/.github/workflows/release.yml +62 -0
- mq_bridge_py-0.2.16/.github/workflows/test-matrix.yml +48 -0
- mq_bridge_py-0.2.16/.gitignore +50 -0
- mq_bridge_py-0.2.16/ARCHITECTURE.md +223 -0
- mq_bridge_py-0.2.16/CONFIGURATION.md +227 -0
- mq_bridge_py-0.2.16/CONTRIBUTING.md +73 -0
- mq_bridge_py-0.2.16/Cargo.lock +6815 -0
- mq_bridge_py-0.2.16/Cargo.toml +218 -0
- mq_bridge_py-0.2.16/LICENSE +21 -0
- mq_bridge_py-0.2.16/LICENSE.python +21 -0
- mq_bridge_py-0.2.16/PKG-INFO +110 -0
- mq_bridge_py-0.2.16/README.md +428 -0
- mq_bridge_py-0.2.16/benches/performance_bench.rs +1133 -0
- mq_bridge_py-0.2.16/build.rs +37 -0
- mq_bridge_py-0.2.16/claude.md +155 -0
- mq_bridge_py-0.2.16/examples/debug_ibm_mq_tls.rs +98 -0
- mq_bridge_py-0.2.16/examples/ipc_worker_queue.yaml +107 -0
- mq_bridge_py-0.2.16/mq-bridge.schema.json +2395 -0
- mq_bridge_py-0.2.16/mq_bridge/__init__.py +17 -0
- mq_bridge_py-0.2.16/mq_bridge/__init__.pyi +108 -0
- mq_bridge_py-0.2.16/mq_bridge/py.typed +1 -0
- mq_bridge_py-0.2.16/pyproject.toml +58 -0
- mq_bridge_py-0.2.16/python/mq-bridge-py/Cargo.toml +67 -0
- mq_bridge_py-0.2.16/python/mq-bridge-py/LICENSE.python +21 -0
- mq_bridge_py-0.2.16/python/mq-bridge-py/README.md +86 -0
- mq_bridge_py-0.2.16/python/mq-bridge-py/analysis/bench_http_native.py +389 -0
- mq_bridge_py-0.2.16/python/mq-bridge-py/example.py +40 -0
- mq_bridge_py-0.2.16/python/mq-bridge-py/examples/bench_memory.py +198 -0
- mq_bridge_py-0.2.16/python/mq-bridge-py/examples/bench_memory.yaml +17 -0
- mq_bridge_py-0.2.16/python/mq-bridge-py/examples/json_route.py +34 -0
- mq_bridge_py-0.2.16/python/mq-bridge-py/examples/memory.yaml +15 -0
- mq_bridge_py-0.2.16/python/mq-bridge-py/examples/raw_route.py +29 -0
- mq_bridge_py-0.2.16/python/mq-bridge-py/pyproject-basic.toml +56 -0
- mq_bridge_py-0.2.16/python/mq-bridge-py/src/lib.rs +1928 -0
- mq_bridge_py-0.2.16/python/mq-bridge-py/tests/test_performance_smoke.py +57 -0
- mq_bridge_py-0.2.16/python/mq-bridge-py/tests/test_public_api.py +148 -0
- mq_bridge_py-0.2.16/python/mq-bridge-py/uv.lock +3562 -0
- mq_bridge_py-0.2.16/scripts/analysis/benches/metadata_bench.rs +50 -0
- mq_bridge_py-0.2.16/scripts/analysis/http/analyze_xctrace_time_profile.py +135 -0
- mq_bridge_py-0.2.16/scripts/analysis/http/http_flamegraph.py +387 -0
- mq_bridge_py-0.2.16/scripts/analysis/http/mq_bridge_http_profile.rs +665 -0
- mq_bridge_py-0.2.16/scripts/techempower/Python/mq-bridge-py/benchmark_config.json +26 -0
- mq_bridge_py-0.2.16/scripts/techempower/Python/mq-bridge-py/mq-bridge-py.dockerfile +31 -0
- mq_bridge_py-0.2.16/scripts/techempower/Python/mq-bridge-py/server.py +76 -0
- mq_bridge_py-0.2.16/scripts/techempower/README.md +178 -0
- mq_bridge_py-0.2.16/scripts/techempower/postgres.yml +19 -0
- mq_bridge_py-0.2.16/scripts/techempower/seed.sql +10 -0
- mq_bridge_py-0.2.16/scripts/techempower/verify.sh +102 -0
- mq_bridge_py-0.2.16/src/canonical_message.rs +333 -0
- mq_bridge_py-0.2.16/src/command_handler.rs +555 -0
- mq_bridge_py-0.2.16/src/endpoints/amqp.rs +801 -0
- mq_bridge_py-0.2.16/src/endpoints/aws.rs +651 -0
- mq_bridge_py-0.2.16/src/endpoints/fanout.rs +214 -0
- mq_bridge_py-0.2.16/src/endpoints/file.rs +2083 -0
- mq_bridge_py-0.2.16/src/endpoints/grpc.proto +53 -0
- mq_bridge_py-0.2.16/src/endpoints/grpc.rs +1229 -0
- mq_bridge_py-0.2.16/src/endpoints/http.rs +3214 -0
- mq_bridge_py-0.2.16/src/endpoints/http_stream.rs +1029 -0
- mq_bridge_py-0.2.16/src/endpoints/ibm_mq.rs +784 -0
- mq_bridge_py-0.2.16/src/endpoints/kafka.rs +839 -0
- mq_bridge_py-0.2.16/src/endpoints/memory/endpoint.rs +1535 -0
- mq_bridge_py-0.2.16/src/endpoints/memory/ipc_unix.rs +313 -0
- mq_bridge_py-0.2.16/src/endpoints/memory/ipc_windows.rs +260 -0
- mq_bridge_py-0.2.16/src/endpoints/memory/memory_transport.rs +142 -0
- mq_bridge_py-0.2.16/src/endpoints/memory/mod.rs +21 -0
- mq_bridge_py-0.2.16/src/endpoints/memory/transport.rs +266 -0
- mq_bridge_py-0.2.16/src/endpoints/mod.rs +1508 -0
- mq_bridge_py-0.2.16/src/endpoints/mongodb.rs +1518 -0
- mq_bridge_py-0.2.16/src/endpoints/mqtt.rs +910 -0
- mq_bridge_py-0.2.16/src/endpoints/nats.rs +907 -0
- mq_bridge_py-0.2.16/src/endpoints/null.rs +55 -0
- mq_bridge_py-0.2.16/src/endpoints/reader.rs +354 -0
- mq_bridge_py-0.2.16/src/endpoints/response.rs +74 -0
- mq_bridge_py-0.2.16/src/endpoints/sled.rs +506 -0
- mq_bridge_py-0.2.16/src/endpoints/sqlx.rs +939 -0
- mq_bridge_py-0.2.16/src/endpoints/static_endpoint.rs +283 -0
- mq_bridge_py-0.2.16/src/endpoints/stream_buffer.rs +586 -0
- mq_bridge_py-0.2.16/src/endpoints/switch.rs +206 -0
- mq_bridge_py-0.2.16/src/endpoints/websocket.rs +459 -0
- mq_bridge_py-0.2.16/src/endpoints/zeromq.rs +487 -0
- mq_bridge_py-0.2.16/src/errors.rs +91 -0
- mq_bridge_py-0.2.16/src/event_handler.rs +174 -0
- mq_bridge_py-0.2.16/src/event_store.rs +801 -0
- mq_bridge_py-0.2.16/src/extensions.rs +37 -0
- mq_bridge_py-0.2.16/src/lib.rs +39 -0
- mq_bridge_py-0.2.16/src/middleware/buffer.rs +540 -0
- mq_bridge_py-0.2.16/src/middleware/cookie_jar.rs +490 -0
- mq_bridge_py-0.2.16/src/middleware/deduplication.rs +388 -0
- mq_bridge_py-0.2.16/src/middleware/delay.rs +133 -0
- mq_bridge_py-0.2.16/src/middleware/dlq.rs +587 -0
- mq_bridge_py-0.2.16/src/middleware/limiter.rs +267 -0
- mq_bridge_py-0.2.16/src/middleware/metrics.rs +150 -0
- mq_bridge_py-0.2.16/src/middleware/mod.rs +138 -0
- mq_bridge_py-0.2.16/src/middleware/random_panic.rs +207 -0
- mq_bridge_py-0.2.16/src/middleware/retry.rs +273 -0
- mq_bridge_py-0.2.16/src/middleware/weak_join.rs +265 -0
- mq_bridge_py-0.2.16/src/models.rs +3310 -0
- mq_bridge_py-0.2.16/src/outcomes.rs +108 -0
- mq_bridge_py-0.2.16/src/publisher.rs +214 -0
- mq_bridge_py-0.2.16/src/response.rs +259 -0
- mq_bridge_py-0.2.16/src/route.rs +2655 -0
- mq_bridge_py-0.2.16/src/test_utils.rs +1677 -0
- mq_bridge_py-0.2.16/src/traits.rs +689 -0
- mq_bridge_py-0.2.16/src/type_handler.rs +620 -0
- mq_bridge_py-0.2.16/tests/README.md +19 -0
- mq_bridge_py-0.2.16/tests/armature_integration.rs +182 -0
- mq_bridge_py-0.2.16/tests/integration/amqp.rs +362 -0
- mq_bridge_py-0.2.16/tests/integration/aws.rs +236 -0
- mq_bridge_py-0.2.16/tests/integration/config.toml +0 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/amqp.yml +12 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/aws.yml +18 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/ibm-mq-certs/client.crl +0 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/ibm-mq-certs/client.kdb +0 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/ibm-mq-certs/client.p12 +0 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/ibm-mq-certs/client.rdb +0 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/ibm-mq-certs/client.sth +0 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/ibm_mq.yml +20 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/ibm_mq_tls.yml +22 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/kafka-tls.yml +37 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/kafka.yml +31 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/mariadb.yml +16 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/mongodb-replica.yml +15 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/mongodb-tls.yml +15 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/mongodb.yml +13 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/mosquitto.conf +7 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/mosquitto_performance.conf +12 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/mosquitto_persistence.conf +18 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/mq_init.mqsc +11 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/mq_init_tls.mqsc +3 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/mqtt.yml +17 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/mqtt_performance.yml +13 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/mysql.yml +16 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/nats.yml +13 -0
- mq_bridge_py-0.2.16/tests/integration/docker-compose/postgres.yml +15 -0
- mq_bridge_py-0.2.16/tests/integration/file.rs +45 -0
- mq_bridge_py-0.2.16/tests/integration/grpc.rs +348 -0
- mq_bridge_py-0.2.16/tests/integration/grpc_tls.rs +128 -0
- mq_bridge_py-0.2.16/tests/integration/http.rs +328 -0
- mq_bridge_py-0.2.16/tests/integration/http_tls.rs +160 -0
- mq_bridge_py-0.2.16/tests/integration/ibm_mq.rs +320 -0
- mq_bridge_py-0.2.16/tests/integration/ibm_mq_tls.rs +45 -0
- mq_bridge_py-0.2.16/tests/integration/ipc.rs +202 -0
- mq_bridge_py-0.2.16/tests/integration/kafka.rs +235 -0
- mq_bridge_py-0.2.16/tests/integration/kafka_tls.rs +39 -0
- mq_bridge_py-0.2.16/tests/integration/logic_test.rs +109 -0
- mq_bridge_py-0.2.16/tests/integration/mariadb.rs +196 -0
- mq_bridge_py-0.2.16/tests/integration/memory.rs +113 -0
- mq_bridge_py-0.2.16/tests/integration/mod.rs +47 -0
- mq_bridge_py-0.2.16/tests/integration/mongodb.rs +382 -0
- mq_bridge_py-0.2.16/tests/integration/mongodb_raw.rs +62 -0
- mq_bridge_py-0.2.16/tests/integration/mongodb_tls.rs +40 -0
- mq_bridge_py-0.2.16/tests/integration/mqtt.rs +227 -0
- mq_bridge_py-0.2.16/tests/integration/mysql.rs +196 -0
- mq_bridge_py-0.2.16/tests/integration/nats.rs +210 -0
- mq_bridge_py-0.2.16/tests/integration/performance_static.rs +67 -0
- mq_bridge_py-0.2.16/tests/integration/postgres.rs +196 -0
- mq_bridge_py-0.2.16/tests/integration/route.rs +1505 -0
- mq_bridge_py-0.2.16/tests/integration/scripts/gen_certs.sh +183 -0
- mq_bridge_py-0.2.16/tests/integration/sqlite.rs +173 -0
- mq_bridge_py-0.2.16/tests/integration/tls_helpers.rs +143 -0
- mq_bridge_py-0.2.16/tests/integration/websocket.rs +72 -0
- mq_bridge_py-0.2.16/tests/integration/zeromq.rs +39 -0
- mq_bridge_py-0.2.16/tests/integration_test.rs +434 -0
- mq_bridge_py-0.2.16/tests/ref_test.rs +236 -0
- mq_bridge_py-0.2.16/tests/sqlite_test.rs +18 -0
- mq_bridge_py-0.2.16/tests/tls_example.rs +40 -0
- mq_bridge_py-0.2.16/tests/unit_tests.md +214 -0
- mq_bridge_py-0.2.16/tests/websocket_test.rs +118 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug Report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: '[BUG] '
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Description
|
|
10
|
+
|
|
11
|
+
<!-- A clear and concise description of what the bug is -->
|
|
12
|
+
|
|
13
|
+
## Steps to Reproduce
|
|
14
|
+
|
|
15
|
+
1.
|
|
16
|
+
2.
|
|
17
|
+
3.
|
|
18
|
+
|
|
19
|
+
## Expected Behavior
|
|
20
|
+
|
|
21
|
+
<!-- What you expected to happen -->
|
|
22
|
+
|
|
23
|
+
## Actual Behavior
|
|
24
|
+
|
|
25
|
+
<!-- What actually happened -->
|
|
26
|
+
|
|
27
|
+
## Environment
|
|
28
|
+
|
|
29
|
+
- OS: [e.g., Ubuntu 22.04, macOS 13, Windows 11]
|
|
30
|
+
- Rust version: [e.g., 1.75.0]
|
|
31
|
+
- mq-bridge version: [e.g., 0.1.2]
|
|
32
|
+
- Features enabled: [e.g., kafka, nats, full]
|
|
33
|
+
|
|
34
|
+
## Configuration
|
|
35
|
+
|
|
36
|
+
<!-- If applicable, paste your configuration (remove sensitive information) -->
|
|
37
|
+
|
|
38
|
+
```yaml
|
|
39
|
+
# Your config here
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Logs/Error Messages
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
<!-- Paste relevant logs or error messages here -->
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Additional Context
|
|
49
|
+
|
|
50
|
+
<!-- Add any other context about the problem here -->
|
|
51
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature Request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: '[FEATURE] '
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Description
|
|
10
|
+
|
|
11
|
+
<!-- A clear and concise description of the feature you'd like to see -->
|
|
12
|
+
|
|
13
|
+
## Motivation
|
|
14
|
+
|
|
15
|
+
<!-- Why is this feature needed? What problem does it solve? -->
|
|
16
|
+
|
|
17
|
+
## Proposed Solution
|
|
18
|
+
|
|
19
|
+
<!-- Describe how you envision this feature working -->
|
|
20
|
+
|
|
21
|
+
## Alternatives Considered
|
|
22
|
+
|
|
23
|
+
<!-- Describe any alternative solutions or features you've considered -->
|
|
24
|
+
|
|
25
|
+
## Use Cases
|
|
26
|
+
|
|
27
|
+
<!-- Provide examples of how this feature would be used -->
|
|
28
|
+
|
|
29
|
+
1.
|
|
30
|
+
2.
|
|
31
|
+
3.
|
|
32
|
+
|
|
33
|
+
## Additional Context
|
|
34
|
+
|
|
35
|
+
<!-- Add any other context, mockups, or examples about the feature request here -->
|
|
36
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
|
|
3
|
+
<!-- Describe your changes in detail -->
|
|
4
|
+
|
|
5
|
+
## Type of Change
|
|
6
|
+
|
|
7
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
8
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
9
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
10
|
+
- [ ] Documentation update
|
|
11
|
+
- [ ] Performance improvement
|
|
12
|
+
- [ ] Code refactoring
|
|
13
|
+
|
|
14
|
+
## Testing
|
|
15
|
+
|
|
16
|
+
<!-- Describe the tests you ran and how to verify your changes -->
|
|
17
|
+
|
|
18
|
+
- [ ] Unit tests pass
|
|
19
|
+
- [ ] Integration tests pass (if applicable)
|
|
20
|
+
- [ ] Manual testing completed
|
|
21
|
+
|
|
22
|
+
## Checklist
|
|
23
|
+
|
|
24
|
+
- [ ] Code follows the project's style guidelines
|
|
25
|
+
- [ ] Self-review completed
|
|
26
|
+
- [ ] Comments added for complex code
|
|
27
|
+
- [ ] Documentation updated (if needed)
|
|
28
|
+
- [ ] No new warnings generated
|
|
29
|
+
- [ ] Tests added/updated for new functionality
|
|
30
|
+
- [ ] All tests pass locally
|
|
31
|
+
|
|
32
|
+
## Related Issues
|
|
33
|
+
|
|
34
|
+
<!-- Link to related issues using #issue_number -->
|
|
35
|
+
|
|
36
|
+
Fixes #
|
|
37
|
+
Related to #
|
|
38
|
+
|
|
39
|
+
## Additional Notes
|
|
40
|
+
|
|
41
|
+
<!-- Any additional information that reviewers should know -->
|
|
42
|
+
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
name: Benchmark
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
env:
|
|
11
|
+
CARGO_TERM_COLOR: always
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: write
|
|
15
|
+
deployments: write
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
benchmark:
|
|
19
|
+
name: Performance Benchmarks
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- name: Install Rust toolchain
|
|
25
|
+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
26
|
+
|
|
27
|
+
- name: Cache cargo registry
|
|
28
|
+
uses: actions/cache@v4
|
|
29
|
+
with:
|
|
30
|
+
path: |
|
|
31
|
+
~/.cargo/bin/
|
|
32
|
+
~/.cargo/registry/cache/
|
|
33
|
+
~/.cargo/git/db/
|
|
34
|
+
target/
|
|
35
|
+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
36
|
+
restore-keys: |
|
|
37
|
+
${{ runner.os }}-cargo-
|
|
38
|
+
|
|
39
|
+
- name: Pre-pull docker images
|
|
40
|
+
run: |
|
|
41
|
+
find tests/integration/docker-compose -name "*.yml" | xargs -P 4 -I {} docker compose -f {} pull -q
|
|
42
|
+
|
|
43
|
+
- name: Run benchmarks
|
|
44
|
+
shell: bash
|
|
45
|
+
run: |
|
|
46
|
+
set -o pipefail
|
|
47
|
+
export CARGO_TERM_COLOR=never
|
|
48
|
+
cargo bench --bench performance_bench --features full -- --output-format bencher | tee raw_output.txt
|
|
49
|
+
# Filter output to only include benchmark results, removing Docker logs and custom prints
|
|
50
|
+
awk '/^test / { if ($0 ~ /bench:/) { print $0; name="" } else { name=$2 } } /^bench:/ { if (name != "") { print "test " name " ... " $0; name="" } }' raw_output.txt > output.txt
|
|
51
|
+
|
|
52
|
+
- name: Generate Throughput Summary
|
|
53
|
+
run: |
|
|
54
|
+
python3 -c '
|
|
55
|
+
import re
|
|
56
|
+
import os
|
|
57
|
+
|
|
58
|
+
data = {}
|
|
59
|
+
try:
|
|
60
|
+
with open("raw_output.txt", "r") as f:
|
|
61
|
+
for line in f:
|
|
62
|
+
# Match lines like: "aws single_write: 1 iters, total time 1.48s, 673.75 msgs/sec"
|
|
63
|
+
m = re.search(r"^\s*(.*): .* ([\d\.]+) msgs/sec", line)
|
|
64
|
+
if m:
|
|
65
|
+
name = m.group(1).strip()
|
|
66
|
+
rate = float(m.group(2))
|
|
67
|
+
if name not in data:
|
|
68
|
+
data[name] = []
|
|
69
|
+
data[name].append(rate)
|
|
70
|
+
|
|
71
|
+
if data:
|
|
72
|
+
with open(os.environ["GITHUB_STEP_SUMMARY"], "a") as f:
|
|
73
|
+
f.write("### Benchmark Throughput Results\n")
|
|
74
|
+
f.write("| Test Case | Average msgs/sec | Samples |\n")
|
|
75
|
+
f.write("|-----------|------------------|---------|\n")
|
|
76
|
+
for name in sorted(data.keys()):
|
|
77
|
+
rates = data[name]
|
|
78
|
+
avg = sum(rates) / len(rates)
|
|
79
|
+
f.write(f"| {name} | {avg:,.2f} | {len(rates)} |\n")
|
|
80
|
+
except Exception as e:
|
|
81
|
+
print(f"Error generating summary: {e}")
|
|
82
|
+
'
|
|
83
|
+
|
|
84
|
+
- name: Create gh-pages branch if missing
|
|
85
|
+
run: |
|
|
86
|
+
git fetch origin gh-pages || {
|
|
87
|
+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
88
|
+
git config --global user.name "github-actions[bot]"
|
|
89
|
+
git checkout --orphan gh-pages
|
|
90
|
+
git rm -rf .
|
|
91
|
+
git commit --allow-empty -m "Initialize gh-pages branch"
|
|
92
|
+
git push origin gh-pages
|
|
93
|
+
git checkout ${{ github.sha }}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
- name: Store benchmark result
|
|
97
|
+
uses: benchmark-action/github-action-benchmark@v1
|
|
98
|
+
with:
|
|
99
|
+
name: Rust Benchmark
|
|
100
|
+
tool: 'cargo'
|
|
101
|
+
output-file-path: output.txt
|
|
102
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
103
|
+
auto-push: true
|
|
104
|
+
alert-threshold: '40000%'
|
|
105
|
+
comment-on-alert: true
|
|
106
|
+
fail-on-alert: false
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, dev]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
CARGO_TERM_COLOR: always
|
|
11
|
+
RUST_BACKTRACE: 1
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
# Linting and formatting checks
|
|
15
|
+
check:
|
|
16
|
+
name: Check
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Install Rust toolchain
|
|
22
|
+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
23
|
+
with:
|
|
24
|
+
components: rustfmt, clippy
|
|
25
|
+
|
|
26
|
+
- name: Cache cargo registry
|
|
27
|
+
uses: actions/cache@v4
|
|
28
|
+
with:
|
|
29
|
+
path: |
|
|
30
|
+
~/.cargo/bin/
|
|
31
|
+
~/.cargo/registry/cache/
|
|
32
|
+
~/.cargo/git/db/
|
|
33
|
+
target/
|
|
34
|
+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
35
|
+
restore-keys: |
|
|
36
|
+
${{ runner.os }}-cargo-
|
|
37
|
+
|
|
38
|
+
- name: Check formatting
|
|
39
|
+
run: cargo fmt --all -- --check
|
|
40
|
+
|
|
41
|
+
- name: Run clippy
|
|
42
|
+
run: cargo clippy --all-targets --all-features -- -D warnings
|
|
43
|
+
|
|
44
|
+
# Build with all features
|
|
45
|
+
build:
|
|
46
|
+
name: Build
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
strategy:
|
|
49
|
+
matrix:
|
|
50
|
+
features:
|
|
51
|
+
- ""
|
|
52
|
+
- "full"
|
|
53
|
+
- "kafka"
|
|
54
|
+
# "amqp" # no recent changes, already included in full
|
|
55
|
+
- "nats"
|
|
56
|
+
- "grpc"
|
|
57
|
+
- "mqtt"
|
|
58
|
+
- "mongodb"
|
|
59
|
+
- "http"
|
|
60
|
+
# - "aws" # needs too long, already included in full
|
|
61
|
+
# - "zeromq" # no recent changes, already included in full
|
|
62
|
+
steps:
|
|
63
|
+
- uses: actions/checkout@v4
|
|
64
|
+
|
|
65
|
+
- name: Install Rust toolchain
|
|
66
|
+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
67
|
+
|
|
68
|
+
- name: Cache cargo registry
|
|
69
|
+
uses: actions/cache@v4
|
|
70
|
+
with:
|
|
71
|
+
path: |
|
|
72
|
+
~/.cargo/bin/
|
|
73
|
+
~/.cargo/registry/cache/
|
|
74
|
+
~/.cargo/git/db/
|
|
75
|
+
target/
|
|
76
|
+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
77
|
+
restore-keys: |
|
|
78
|
+
${{ runner.os }}-cargo-
|
|
79
|
+
|
|
80
|
+
- name: Build
|
|
81
|
+
run: |
|
|
82
|
+
if [ -z "${{ matrix.features }}" ]; then
|
|
83
|
+
cargo build --release
|
|
84
|
+
else
|
|
85
|
+
cargo build --release --features "${{ matrix.features }}"
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
# Unit tests
|
|
89
|
+
test:
|
|
90
|
+
name: Test
|
|
91
|
+
runs-on: ubuntu-latest
|
|
92
|
+
steps:
|
|
93
|
+
- uses: actions/checkout@v4
|
|
94
|
+
|
|
95
|
+
- name: Install Rust toolchain
|
|
96
|
+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
97
|
+
|
|
98
|
+
- name: Cache cargo registry
|
|
99
|
+
uses: actions/cache@v4
|
|
100
|
+
with:
|
|
101
|
+
path: |
|
|
102
|
+
~/.cargo/bin/
|
|
103
|
+
~/.cargo/registry/cache/
|
|
104
|
+
~/.cargo/git/db/
|
|
105
|
+
target/
|
|
106
|
+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
107
|
+
restore-keys: |
|
|
108
|
+
${{ runner.os }}-cargo-
|
|
109
|
+
|
|
110
|
+
- name: Run unit tests
|
|
111
|
+
run: cargo test --lib --features=full
|
|
112
|
+
# currently - just random panic test
|
|
113
|
+
# - name: Run long-running unit tests
|
|
114
|
+
# run: cargo test --lib --features=full -- --ignored --nocapture
|
|
115
|
+
|
|
116
|
+
# Integration tests (requires Docker) split into parallel jobs
|
|
117
|
+
integration-others:
|
|
118
|
+
name: Integration — Others
|
|
119
|
+
runs-on: ubuntu-latest
|
|
120
|
+
services:
|
|
121
|
+
docker:
|
|
122
|
+
image: docker:dind
|
|
123
|
+
options: --privileged
|
|
124
|
+
steps:
|
|
125
|
+
- uses: actions/checkout@v4
|
|
126
|
+
|
|
127
|
+
- name: Install Rust toolchain
|
|
128
|
+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
129
|
+
|
|
130
|
+
- name: Cache cargo registry
|
|
131
|
+
uses: actions/cache@v4
|
|
132
|
+
with:
|
|
133
|
+
path: |
|
|
134
|
+
~/.cargo/bin/
|
|
135
|
+
~/.cargo/registry/cache/
|
|
136
|
+
~/.cargo/git/db/
|
|
137
|
+
target/
|
|
138
|
+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
139
|
+
restore-keys: |
|
|
140
|
+
${{ runner.os }}-cargo-
|
|
141
|
+
|
|
142
|
+
- name: Pre-pull docker images
|
|
143
|
+
run: |
|
|
144
|
+
find tests/integration/docker-compose -name "*.yml" | xargs -P 5 -I {} docker compose -f {} pull -q
|
|
145
|
+
- name: Install JDK (for keytool)
|
|
146
|
+
run: |
|
|
147
|
+
sudo apt-get update
|
|
148
|
+
sudo apt-get install -y default-jdk
|
|
149
|
+
|
|
150
|
+
- name: Generate TLS certs for integration services
|
|
151
|
+
run: |
|
|
152
|
+
chmod +x tests/integration/scripts/gen_certs.sh
|
|
153
|
+
./tests/integration/scripts/gen_certs.sh mongodb
|
|
154
|
+
./tests/integration/scripts/gen_certs.sh kafka
|
|
155
|
+
./tests/integration/scripts/gen_certs.sh ibm-mq
|
|
156
|
+
|
|
157
|
+
- name: Run chaos/stability tests
|
|
158
|
+
run: |
|
|
159
|
+
cargo test --test integration_test --release --features full,test-utils -- --ignored --nocapture --test-threads=1 --exact test_all_chaos
|
|
160
|
+
|
|
161
|
+
- name: Run remaining integration tests (excluding chaos & performance)
|
|
162
|
+
run: |
|
|
163
|
+
cargo test --test integration_test --release --features full,test-utils -- --ignored --nocapture --test-threads=1 --skip test_all_chaos --skip test_all_performance_pipeline --skip test_all_performance_direct
|
|
164
|
+
|
|
165
|
+
integration-performance:
|
|
166
|
+
name: Integration — Performance
|
|
167
|
+
runs-on: ubuntu-latest
|
|
168
|
+
services:
|
|
169
|
+
docker:
|
|
170
|
+
image: docker:dind
|
|
171
|
+
options: --privileged
|
|
172
|
+
steps:
|
|
173
|
+
- uses: actions/checkout@v4
|
|
174
|
+
|
|
175
|
+
- name: Install Rust toolchain
|
|
176
|
+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
177
|
+
|
|
178
|
+
- name: Cache cargo registry
|
|
179
|
+
uses: actions/cache@v4
|
|
180
|
+
with:
|
|
181
|
+
path: |
|
|
182
|
+
~/.cargo/bin/
|
|
183
|
+
~/.cargo/registry/cache/
|
|
184
|
+
~/.cargo/git/db/
|
|
185
|
+
target/
|
|
186
|
+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
187
|
+
restore-keys: |
|
|
188
|
+
${{ runner.os }}-cargo-
|
|
189
|
+
|
|
190
|
+
- name: Pre-pull docker images
|
|
191
|
+
run: |
|
|
192
|
+
find tests/integration/docker-compose -name "*.yml" | xargs -P 5 -I {} docker compose -f {} pull -q
|
|
193
|
+
- name: Install JDK (for keytool)
|
|
194
|
+
run: |
|
|
195
|
+
sudo apt-get update
|
|
196
|
+
sudo apt-get install -y default-jdk
|
|
197
|
+
|
|
198
|
+
- name: Generate TLS certs for integration services
|
|
199
|
+
run: |
|
|
200
|
+
chmod +x tests/integration/scripts/gen_certs.sh
|
|
201
|
+
./tests/integration/scripts/gen_certs.sh mongodb
|
|
202
|
+
./tests/integration/scripts/gen_certs.sh kafka
|
|
203
|
+
./tests/integration/scripts/gen_certs.sh ibm-mq
|
|
204
|
+
|
|
205
|
+
- name: Run pipeline performance tests
|
|
206
|
+
run: |
|
|
207
|
+
cargo test --test integration_test --release --features full,test-utils -- --ignored --nocapture --test-threads=1 --exact test_all_performance_pipeline
|
|
208
|
+
|
|
209
|
+
- name: Run other performance tests
|
|
210
|
+
run: |
|
|
211
|
+
cargo test --test integration_test --release --features full,test-utils -- --ignored --nocapture --test-threads=1 --exact test_all_performance_direct
|
|
212
|
+
|
|
213
|
+
integration-armature:
|
|
214
|
+
name: Integration — Armature
|
|
215
|
+
runs-on: ubuntu-latest
|
|
216
|
+
services:
|
|
217
|
+
docker:
|
|
218
|
+
image: docker:dind
|
|
219
|
+
options: --privileged
|
|
220
|
+
steps:
|
|
221
|
+
- uses: actions/checkout@v4
|
|
222
|
+
|
|
223
|
+
- name: Install Rust toolchain
|
|
224
|
+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
225
|
+
|
|
226
|
+
- name: Cache cargo registry
|
|
227
|
+
uses: actions/cache@v4
|
|
228
|
+
with:
|
|
229
|
+
path: |
|
|
230
|
+
~/.cargo/bin/
|
|
231
|
+
~/.cargo/registry/cache/
|
|
232
|
+
~/.cargo/git/db/
|
|
233
|
+
target/
|
|
234
|
+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
235
|
+
restore-keys: |
|
|
236
|
+
${{ runner.os }}-cargo-
|
|
237
|
+
|
|
238
|
+
- name: Pre-pull docker images
|
|
239
|
+
run: |
|
|
240
|
+
find tests/integration/docker-compose -name "*.yml" | xargs -P 5 -I {} docker compose -f {} pull -q
|
|
241
|
+
- name: Install JDK (for keytool)
|
|
242
|
+
run: |
|
|
243
|
+
sudo apt-get update
|
|
244
|
+
sudo apt-get install -y default-jdk
|
|
245
|
+
|
|
246
|
+
- name: Generate TLS certs for integration services
|
|
247
|
+
run: |
|
|
248
|
+
chmod +x tests/integration/scripts/gen_certs.sh
|
|
249
|
+
./tests/integration/scripts/gen_certs.sh mongodb
|
|
250
|
+
./tests/integration/scripts/gen_certs.sh kafka
|
|
251
|
+
./tests/integration/scripts/gen_certs.sh ibm-mq
|
|
252
|
+
|
|
253
|
+
- name: Run armature integration tests
|
|
254
|
+
run: |
|
|
255
|
+
cargo test --test armature_integration --release --features full,test-utils -- --ignored --nocapture --test-threads=1
|
|
256
|
+
|
|
257
|
+
# Documentation
|
|
258
|
+
docs:
|
|
259
|
+
name: Documentation
|
|
260
|
+
runs-on: ubuntu-latest
|
|
261
|
+
steps:
|
|
262
|
+
- uses: actions/checkout@v4
|
|
263
|
+
|
|
264
|
+
- name: Install Rust toolchain
|
|
265
|
+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
266
|
+
|
|
267
|
+
- name: Cache cargo registry
|
|
268
|
+
uses: actions/cache@v4
|
|
269
|
+
with:
|
|
270
|
+
path: |
|
|
271
|
+
~/.cargo/bin/
|
|
272
|
+
~/.cargo/registry/cache/
|
|
273
|
+
~/.cargo/git/db/
|
|
274
|
+
target/
|
|
275
|
+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
276
|
+
restore-keys: |
|
|
277
|
+
${{ runner.os }}-cargo-
|
|
278
|
+
|
|
279
|
+
- name: Build documentation
|
|
280
|
+
run: cargo doc --all-features --no-deps
|
|
281
|
+
|
|
282
|
+
- name: Check for broken links
|
|
283
|
+
run: cargo doc --all-features --no-deps 2>&1 | grep -i "warning\|error" && exit 1 || exit 0
|