Skip to content

[Task]: Isolate fixtures from focused performance scenarios #186

Closed

Description

@MisterVVP

Proposal

Context

PR #184 added PostgreSQL command-level timing and call counts. The diagnostics now prove that several named performance rows still include setup work inside the measured operation.

Examples include:

  • in-process PushConfig_Get, PushConfig_List, and PushConfig_Delete;
  • wire GetTask_ExistingTask;
  • wire push-config create/get/list/delete.

This makes headline latency unsuitable for ranking the named APIs.

Goal

Prepare all required tasks and push configs before the measured window so each focused row executes exactly the API operation named by the scenario.

Scope

In-process

Move setup outside measurement for:

  • PushConfig_Get;
  • PushConfig_List;
  • PushConfig_Delete.

Keep PushConfig_Create as one measured create call against a pre-existing task.

Use:

  • a shared immutable fixture for get;
  • a fixed pre-seeded config set for list;
  • one independent existing config per measured delete operation.

Warmup must not consume measured delete fixtures.

Wire

Move setup outside measurement for:

  • GetTask_ExistingTask;
  • PushConfig_Create;
  • PushConfig_Get;
  • PushConfig_List;
  • PushConfig_Delete.

After preparation, each timed operation must make one matching client API call. Do not create tasks, configs, clients, channels, or transports inside the timed operation unless creation is explicitly part of the scenario.

Expected PostgreSQL calls after isolation

Scenario Expected calls per operation
GetTask_ExistingTask task_get × 1
PushConfig_Create task_get × 1, push_config_upsert × 1
PushConfig_Get push_config_get × 1
PushConfig_List task_get × 1, push_config_list_count × 1, push_config_list_select × 1
PushConfig_Delete push_config_delete × 1

Tests

Add deterministic coverage proving:

  • setup counters remain unchanged during focused measured operations;
  • destructive fixtures are independent;
  • warmup cannot consume measured fixtures;
  • in-process and wire scenarios start from equivalent state;
  • PostgreSQL calls per operation match the expected table;
  • missing and invalid-input scenarios retain their intended semantics.

Validation

Run the normal performance matrix with pool size 64 and concurrency 1,4,16,64.

Report:

  • throughput;
  • p50, p95, p99, and max;
  • PostgreSQL phase times;
  • calls per operation;
  • zero errors.

Treat lower latency caused by removing fixture setup as benchmark correction, not an SDK runtime optimisation.

Out of scope

Acceptance criteria

  • Every focused row measures only the named public operation.
  • Warmup and measured fixtures are isolated.
  • In-process and wire semantics are aligned.
  • PostgreSQL call shapes match expectations.
  • Documentation explains fixture preparation.
  • Performance smoke, TCK, formatting, tests, clang-tidy, and ./scripts/verify_changes.sh pass.

Activity

  1. added
    enhancement
    on Jul 31, 2026
  2. moved this from Todo to In Progress in a2a-cpp SDK Roadmapon Aug 9, 2026
  3. self-assigned this
    on Aug 9, 2026
  4. added a commit that references this issue on Aug 10, 2026
    9b067c1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions