Skip to content

Complete performance kit coverage gaps: concurrency, subscriptions, duration, and wire scenarios - #142

Merged
MisterVVP merged 2 commits into
dev-add-performance-test-kit-for-sdkfrom
dev-complete-sdk-performance-test-kit-gaps
Jul 11, 2026
Merged

MisterVVP merged 2 commits into
dev-add-performance-test-kit-for-sdkfrom
dev-complete-sdk-performance-test-kit-gaps

Conversation

@MisterVVP

@MisterVVP MisterVVP commented Jul 11, 2026 •

Copy link
Copy Markdown
Owner

Motivation

  • Remove artificial global serialization and finish missing performance-kit behaviors so measurements reflect real concurrency, multi-subscriber delivery, disconnect isolation, terminal-stream completion, duration-based workloads, and additional wire-level scenarios.
  • Provide clear, honest report rows that distinguish in-process SDK coverage from real transport (wire) measurements and expose scenario-specific delivery/callback/event counters.
  • Extend the smoke matrix and runner tests so CI remains report-only but exercises streaming, subscriptions, and push-config CRUD across transports where the SDK exposes those operations.

Description

  • Reworked the C++ in-process harness to remove the global mutex and run worker-local request contexts so operations with concurrency > 1 execute truly concurrently, and per-worker IDs/fixtures prevent races.
  • Implemented real subscription scenarios: SubscribeToTask_MultiSubscriber opens simultaneous subscriptions and verifies delivery to all, SubscribeToTask_DisconnectOneSubscriber cancels one subscription and verifies remaining subscribers still receive updates, and SubscribeToTask_TerminalCompletionLatency observes terminal update delivery and stream completion; these use bounded waits and concurrent waiter futures.
  • Added duration-aware execution to the shared measurement harness so A2A_PERF_DURATION_SECONDS enforces a duration stop rule (rows stop when either requests or duration limit is reached), and drivers now report configured_requests, configured_duration_seconds, measured_duration_seconds, and actual operations.
  • Extended wire-level driver coverage to include finite streaming (SendStreamingMessage_FiniteStream), first-event subscription (SubscribeToTask_FirstEventLatency), and push notification config CRUD (PushConfig_Create/Get/List/Delete) for gRPC, JSON-RPC, and HTTP+JSON, using real tck_sut-backed clients and per-worker client reuse.
  • Augmented reporting and runner CSV/schema with scenario-specific counters (successful_deliveries, failed_deliveries, event_count, callback_count) and added driver_type/transport_path honesty rules; updated scripts/performance_runner.py and docs/performance-testing.md to document request-count vs duration semantics and the final transport coverage.
  • Notes and limitation: multi-subscriber, disconnect-isolation, terminal completion, and callback fan-out remain SDK in-process rows in this change (they are implemented as real in-process streaming/subscription scenarios); wire-level push CRUD and wire streaming/first-event subscription were added while a deterministic local HTTP callback fan-out endpoint was not added in this rollup and remains a follow-up item.

@MisterVVP MisterVVP added the AI agent AI agent contribution label Jul 11, 2026 — with ChatGPT Codex Connector
@MisterVVP MisterVVP self-assigned this Jul 11, 2026
…uration, and wire scenarios

### Motivation

- Remove artificial global serialization and finish missing performance-kit behaviors so measurements reflect real concurrency, multi-subscriber delivery, disconnect isolation, terminal-stream completion, duration-based workloads, and additional wire-level scenarios.
- Provide clear, honest report rows that distinguish in-process SDK coverage from real transport (wire) measurements and expose scenario-specific delivery/callback/event counters.
- Extend the smoke matrix and runner tests so CI remains report-only but exercises streaming, subscriptions, and push-config CRUD across transports where the SDK exposes those operations.

### Description

- Reworked the C++ in-process harness to remove the global mutex and run worker-local request contexts so operations with `concurrency > 1` execute truly concurrently, and per-worker IDs/fixtures prevent races.
- Implemented real subscription scenarios: `SubscribeToTask_MultiSubscriber` opens simultaneous subscriptions and verifies delivery to all, `SubscribeToTask_DisconnectOneSubscriber` cancels one subscription and verifies remaining subscribers still receive updates, and `SubscribeToTask_TerminalCompletionLatency` observes terminal update delivery and stream completion; these use bounded waits and concurrent waiter futures.
- Added duration-aware execution to the shared measurement harness so `A2A_PERF_DURATION_SECONDS` enforces a duration stop rule (rows stop when either requests or duration limit is reached), and drivers now report `configured_requests`, `configured_duration_seconds`, `measured_duration_seconds`, and actual `operations`.
- Extended wire-level driver coverage to include finite streaming (`SendStreamingMessage_FiniteStream`), first-event subscription (`SubscribeToTask_FirstEventLatency`), and push notification config CRUD (`PushConfig_Create/Get/List/Delete`) for gRPC, JSON-RPC, and HTTP+JSON, using real `tck_sut`-backed clients and per-worker client reuse.
- Augmented reporting and runner CSV/schema with scenario-specific counters (`successful_deliveries`, `failed_deliveries`, `event_count`, `callback_count`) and added `driver_type`/`transport_path` honesty rules; updated `scripts/performance_runner.py` and `docs/performance-testing.md` to document request-count vs duration semantics and the final transport coverage.
- Notes and limitation: multi-subscriber, disconnect-isolation, terminal completion, and callback fan-out remain SDK in-process rows in this change (they are implemented as real in-process streaming/subscription scenarios); wire-level push CRUD and wire streaming/first-event subscription were added while a deterministic local HTTP callback fan-out endpoint was not added in this rollup and remains a follow-up item.

### Testing

- Formatting and build: ran `./scripts/run_clang_format.sh` and `clang-format --dry-run --Werror $(git ls-files '*.h' '*.hpp' '*.c' '*.cpp')` with no failures and built the project via `cmake --build build --target a2a_performance_driver a2a_wire_performance_driver`.
- Unit and script tests: ran `python3 -m unittest tests/scripts/performance_runner_test.py` and the test suite in this area passed; repository `ctest` run in `./scripts/verify_changes.sh` completed and all 377 ctest tests passed.
- Functional driver smoke runs: executed the in-process driver for subscription scenarios and verified JSON validity and scenario fields with `./build/tests/a2a_performance_driver --transport grpc --store-backend inmemory --requests 2 --concurrency 2 --warmup-seconds 0 --duration-seconds 0 --scenarios SubscribeToTask_MultiSubscriber,SubscribeToTask_DisconnectOneSubscriber,SubscribeToTask_TerminalCompletionLatency` and verified duration-mode behavior with a long-run check using `--duration-seconds` (asserting `operations < configured_requests` and measured duration >= configured limit).
- Wire driver smoke runs: built and exercised the wire driver against `tck_sut` for the added wire scenarios and verified returned metadata rows and transport path consistency.
- Linting: ran targeted `clang-tidy` on the modified performance driver files and fixed reported findings; the changed performance files pass the focused `clang-tidy` checks included in the validation steps, while a complete full-source `clang-tidy` sweep (the project's full lint profile) is expensive and was not re-run to completion in this environment.

If you want, I can follow up to implement a deterministic local HTTP callback fan-out endpoint and extend the wire-level push-delivery E2E measurement (or re-run the full clang-tidy sweep and TCK mandatory flow in CI-equivalent environment on your behalf).
@MisterVVP
MisterVVP merged commit 8b7ad57 into dev-add-performance-test-kit-for-sdk Jul 11, 2026
16 checks passed
@MisterVVP
MisterVVP deleted the dev-complete-sdk-performance-test-kit-gaps branch July 11, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI agent AI agent contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant