Repository navigation
Description
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, andPushConfig_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
- SQL round-trip reduction.
- New batch APIs.
- Production store redesign.
- Implementing [Feature]: Add benchmark decomposition for REST and JSON-RPC paths #85.
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.shpass.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
Isolate focused performance scenario fixtures (#199)