Skip to content

Isolate focused performance scenario fixtures - #199

Merged
MisterVVP merged 2 commits into
mainfrom
dev-isolate-setup-work-from-api-measurements
Aug 10, 2026
Merged

MisterVVP merged 2 commits into
mainfrom
dev-isolate-setup-work-from-api-measurements

Conversation

@MisterVVP

@MisterVVP MisterVVP commented Aug 9, 2026 •

Copy link
Copy Markdown
Owner

Motivation

Closes #186.

Focused performance scenarios previously included fixture setup inside the measured operation. PostgreSQL diagnostics showed that rows named PushConfig_Get, PushConfig_List, and PushConfig_Delete also performed config creation, while several wire scenarios created their task/config fixtures inside the timed path.

This made headline latency and throughput unsuitable for ranking the named APIs.

This PR moves required fixture creation outside the measured window so each focused row measures only its named public operation.

What changed

In-process scenarios

  • PushConfig_Get now uses a shared immutable pre-seeded config.
  • PushConfig_List now uses a fixed pre-seeded three-config fixture.
  • PushConfig_Delete uses independent pre-seeded task/config fixtures for measured operations.
  • Delete warmup uses separate fixtures and cannot consume measured data.
  • PushConfig_Create remains one measured create against an existing task.

Wire scenarios

Focused fixtures are prepared before RunMeasuredScenario:

  • GetTask_ExistingTask uses a shared pre-existing task.
  • PushConfig_Create uses a pre-existing task.
  • PushConfig_Get uses a shared immutable config.
  • PushConfig_List uses a fixed three-config fixture.
  • PushConfig_Delete uses an independent pre-seeded task/config pair per operation.
  • Warmup fixtures use a separate namespace.
  • Worker clients/transports are created before the measured window.

Performance evidence

The observed performance changes are benchmark attribution corrections, not SDK runtime optimizations.

The deterministic evidence is the PostgreSQL command shape. With fixture setup removed from the measured window, each focused in-process operation now performs exactly one matching store command and one connection acquisition:

Scenario Before fixture isolation After
GetTask_ExistingTask task_get × 1 task_get × 1
PushConfig_Create push_config_upsert × 1 push_config_upsert × 1
PushConfig_Get push_config_upsert × 1 + push_config_get × 1 push_config_get × 1
PushConfig_List push_config_upsert × 1 + push_config_list_select × 1 push_config_list_select × 1
PushConfig_Delete push_config_upsert × 1 + push_config_delete × 1 push_config_delete × 1

Representative PostgreSQL concurrency-1 measurements from the latest CI run:

Scenario Before p95 After p95
PushConfig_Create 0.481 ms 0.463 ms
PushConfig_Get 0.804 ms 0.240 ms
PushConfig_List 0.858 ms 0.282 ms
PushConfig_Delete 0.864 ms 0.343 ms

PushConfig_Create remains broadly unchanged because it was already isolated. The larger reductions in get/list/delete reflect removal of setup work that did not belong to those measurements.

Wire-level focused scenarios show the same structural correction: task/config fixture creation now happens before RunMeasuredScenario.

Absolute latency and throughput values come from separate hosted CI runners and should not be interpreted as SDK runtime speedups. The command-count changes are the primary evidence that #186 is complete.

@MisterVVP MisterVVP added the codex Automatic label added by codex agent. Should not be used label Aug 9, 2026 — with ChatGPT Codex Connector
@MisterVVP MisterVVP added AI agent AI agent contribution and removed codex Automatic label added by codex agent. Should not be used labels Aug 9, 2026
@MisterVVP MisterVVP self-assigned this Aug 9, 2026
@MisterVVP MisterVVP linked an issue Aug 9, 2026 that may be closed by this pull request
6 tasks
@MisterVVP MisterVVP added performance Performance improvement related tasks based on benchmark results. Performance tests changes. maintenance labels Aug 10, 2026
@MisterVVP
MisterVVP merged commit 9b067c1 into main Aug 10, 2026
18 checks passed
@MisterVVP
MisterVVP deleted the dev-isolate-setup-work-from-api-measurements branch August 10, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task]: Isolate fixtures from focused performance scenarios

1 participant