Skip to content

Add wire-level performance driver and gRPC ListTasks support; refactor runner/build logic - #141

Merged
MisterVVP merged 6 commits into
dev-add-performance-test-kit-for-sdkfrom
dev-add-real-wire-level-performance-clients
Jul 10, 2026
Merged

MisterVVP merged 6 commits into
dev-add-performance-test-kit-for-sdkfrom
dev-add-real-wire-level-performance-clients

Conversation

@MisterVVP

@MisterVVP MisterVVP commented Jul 10, 2026 •

Copy link
Copy Markdown
Owner

Motivation

  • Provide wire-level performance measurements against the shared tck_sut fixture in addition to the existing in-process SDK driver.
  • Reuse common measurement code across drivers and consolidate build/ensure logic for multiple executables.
  • Implement missing gRPC ListTasks path so wire and in-process list scenarios can be exercised.

Description

  • Introduce a new wire performance driver executable a2a_wire_performance_driver with tests/performance/a2a_wire_performance_driver.cpp to run real client calls against the started tck_sut and emit report rows with driver_type=wire_tck_sut and transport_path=wire_*.
  • Factor common performance helpers into tests/performance/a2a_performance_common.cpp/.h and update the in-process driver to use the shared helpers and result-building helpers.
  • Update scripts/performance_runner.py to support three environment overrides (A2A_PERF_DRIVER, A2A_PERF_WIRE_DRIVER, and A2A_TCK_SUT), add ensure_executable helpers, add ensure_wire_driver, and wire up launching the SUT and running the wire driver with validation of returned metadata.
  • Add new build rules in tests/CMakeLists.txt to compile and link a2a_wire_performance_driver and include the common source for both drivers.
  • Extend the gRPC transport interface and implementation (include/a2a/client/grpc_transport.h and src/client/grpc_transport.cpp) to add support for ListTasks and map between the transport and ListTasksResponse.
  • Update unit and functional tests to exercise the new ListTasks RPC and adjust the performance runner script test to validate separated in-process vs wire rows and presence of tck_sut logs.
  • Update documentation docs/performance-testing.md to describe the two measurement paths, new environment variables, and initial wire scenario coverage.

### Motivation
- Remove the previous relabeling of in-process measurements as wire-level results and provide real transport-level measurements through the shared `tck_sut` fixture.
- Provide true wire clients for HTTP+JSON, JSON-RPC, and gRPC so the performance matrix reflects real end-to-end transport behavior for core lifecycle scenarios.
- Keep the low-overhead in-process SDK driver for SDK/service/store measurements while clearly separating wire-level rows.

### Description
- Add a new wire driver executable `a2a_wire_performance_driver` that implements real client-side scenarios using `HttpJsonTransport`, `JsonRpcTransport`, and `GrpcTransport` and reports rows as `driver_type=wire_tck_sut` with `transport_path=wire_http_json|wire_jsonrpc|wire_grpc` (`tests/performance/a2a_wire_performance_driver.cpp`, `tests/CMakeLists.txt`).
- Update the Python performance runner to build/start the `tck_sut` SUT, wait for HTTP and gRPC readiness, invoke the wire driver, validate that returned rows carry correct `driver_type` and `transport_path`, capture SUT logs, and stop the SUT cleanly (`scripts/performance_runner.py`).
- Add gRPC client `ListTasks` support and the matching `RpcClient::ListTasks` hook so the lifecycle wire scenario set runs consistently over gRPC (`include/a2a/client/grpc_transport.h`, `src/client/grpc_transport.cpp`).
- Update tests and test harnesses to reflect the split: add/adjust assertions in `tests/scripts/performance_runner_test.py`, update gRPC test fakes/contracts for `ListTasks`, and register the wire driver in CMake; update performance docs to describe which scenarios are in-process vs wire-level (`docs/performance-testing.md`).

### Testing
- Ran `python3 -m unittest tests/scripts/performance_runner_test.py` which passed and validates that wire rows are produced only by the wire driver and that `tck_sut` logs are captured.
- Performed local matrix smoke runs via `./scripts/run_performance_tests.sh` (grpc,jsonrpc,http_json with `--requests 1 --concurrency 1`) to exercise wire drivers end-to-end against a locally built `tck_sut`.
- Executed full repository validation with the prescribed CI-local checklist (`./scripts/verify_changes.sh`) which performed format, build, tests and `clang-tidy` and completed successfully.
- Validated SUT lifecycle by starting and stopping the `tck_sut` fixture with `./scripts/run_tck_sut.sh` and `./scripts/stop_tck_sut.sh`; note that an external TCK mandatory runner script was not present in this workspace so the external mandatory suite was not executed here.
@MisterVVP MisterVVP added the AI agent AI agent contribution label Jul 10, 2026 — with ChatGPT Codex Connector
@MisterVVP MisterVVP self-assigned this Jul 10, 2026
…r runner/build logic

### Motivation

- Provide wire-level performance measurements against the shared `tck_sut` fixture in addition to the existing in-process SDK driver.
- Reuse common measurement code across drivers and consolidate build/ensure logic for multiple executables.
- Implement missing gRPC `ListTasks` path so wire and in-process list scenarios can be exercised.

### Description

- Introduce a new wire performance driver executable `a2a_wire_performance_driver` with `tests/performance/a2a_wire_performance_driver.cpp` to run real client calls against the started `tck_sut` and emit report rows with `driver_type=wire_tck_sut` and `transport_path=wire_*`.
- Factor common performance helpers into `tests/performance/a2a_performance_common.cpp`/`.h` and update the in-process driver to use the shared helpers and result-building helpers.
- Update `scripts/performance_runner.py` to support three environment overrides (`A2A_PERF_DRIVER`, `A2A_PERF_WIRE_DRIVER`, and `A2A_TCK_SUT`), add `ensure_executable` helpers, add `ensure_wire_driver`, and wire up launching the SUT and running the wire driver with validation of returned metadata.
- Add new build rules in `tests/CMakeLists.txt` to compile and link `a2a_wire_performance_driver` and include the common source for both drivers.
- Extend the gRPC transport interface and implementation (`include/a2a/client/grpc_transport.h` and `src/client/grpc_transport.cpp`) to add support for `ListTasks` and map between the transport and `ListTasksResponse`.
- Update unit and functional tests to exercise the new `ListTasks` RPC and adjust the performance runner script test to validate separated in-process vs wire rows and presence of `tck_sut` logs.
- Update documentation `docs/performance-testing.md` to describe the two measurement paths, new environment variables, and initial wire scenario coverage.

### Testing

- Built the test targets and new executables; both `a2a_performance_driver` and `a2a_wire_performance_driver` were produced successfully by the CMake build.
- Ran unit tests including the updated `grpc_transport_test` which exercises the `ListTasks` handling, and they passed.
- Ran the performance runner script test `performance_runner_script_test` / `tests/scripts/performance_runner_test.py`, which executed the runner and validated output rows and logs, and it passed.
@MisterVVP MisterVVP added performance Performance improvement related tasks based on benchmark results. Performance tests changes. human Human contribution and removed human Human contribution labels Jul 10, 2026
@MisterVVP MisterVVP moved this from Todo to In Progress in a2a-cpp SDK Roadmap Jul 10, 2026
@MisterVVP
MisterVVP merged commit fa7d65e into dev-add-performance-test-kit-for-sdk Jul 10, 2026
16 checks passed
@MisterVVP
MisterVVP deleted the dev-add-real-wire-level-performance-clients branch July 10, 2026 20:26
@github-project-automation github-project-automation Bot moved this from In Progress to Done in a2a-cpp SDK Roadmap Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI agent AI agent contribution performance Performance improvement related tasks based on benchmark results. Performance tests changes.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant