Repository navigation
Complete performance kit coverage gaps: concurrency, subscriptions, duration, and wire scenarios - #142
Merged
MisterVVP merged 2 commits intoJul 11, 2026
Conversation
…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
merged commit Jul 11, 2026
8b7ad57
into
dev-add-performance-test-kit-for-sdk
16 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
concurrency > 1execute truly concurrently, and per-worker IDs/fixtures prevent races.SubscribeToTask_MultiSubscriberopens simultaneous subscriptions and verifies delivery to all,SubscribeToTask_DisconnectOneSubscribercancels one subscription and verifies remaining subscribers still receive updates, andSubscribeToTask_TerminalCompletionLatencyobserves terminal update delivery and stream completion; these use bounded waits and concurrent waiter futures.A2A_PERF_DURATION_SECONDSenforces a duration stop rule (rows stop when either requests or duration limit is reached), and drivers now reportconfigured_requests,configured_duration_seconds,measured_duration_seconds, and actualoperations.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 realtck_sut-backed clients and per-worker client reuse.successful_deliveries,failed_deliveries,event_count,callback_count) and addeddriver_type/transport_pathhonesty rules; updatedscripts/performance_runner.pyanddocs/performance-testing.mdto document request-count vs duration semantics and the final transport coverage.