Skip to content

test(stability): add query benchmarks + a concurrent read/write test - #69

Open
qiansheng91 wants to merge 1 commit into
mainfrom
codex/stability-benchmarks
Open

test(stability): add query benchmarks + a concurrent read/write test#69
qiansheng91 wants to merge 1 commit into
mainfrom
codex/stability-benchmarks

Conversation

@qiansheng91

Copy link
Copy Markdown
Collaborator

No performance or concurrency coverage existed for the read path.

  • Go benchmarks for QueryEntities / QueryTopo and the query executor.
  • A 24-reader / 8-writer concurrent test over the memory store (race-checked).
  • A non-blocking make bench smoke step in CI.

Verification: benchmarks run; the concurrent test passes under -race.

Benchmarks (internal/graphstore, internal/query) for the hot read paths —
QueryEntities, QueryTopo, and the full Service.Execute entity path — so perf
regressions on large result sets become visible. 'make bench' runs them (smoke
by default, BENCHTIME-overridable); CI runs them non-blocking.

A concurrent read/write test stresses the memory store's RWMutex; under
'go test -race' it is a data-race regression guard for the shared maps
(verified race-clean).

@Mr-Xzz Mr-Xzz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the benchmark smoke target and concurrent read/write test. The CI step is non-blocking and the new test exercises the in-memory store locking path without broadening runtime behavior. No blocking findings from my pass.

@qiansheng91

Copy link
Copy Markdown
Collaborator Author

Issue Evaluation

Category: enhancement | Status: Evaluated

Feasibility: feasible
Scope: query service benchmarks, memory store, CI pipeline
Compatibility: no breaking changes — additive test coverage

This addresses a real gap in performance and concurrency testing. Go benchmarks for QueryEntities/QueryTopo provide baseline metrics, and the 24-reader/8-writer concurrent test with race detection validates thread safety of the memory store. Adding a non-blocking make bench smoke step in CI ensures regressions are caught early without slowing down the pipeline.

Recommendation: Proceed with implementation. Consider:

  • Setting baseline thresholds in benchmarks to detect performance regressions
  • Documenting the concurrent test parameters (24r/8w) and their rationale
  • Ensuring the bench step doesn't block CI on minor regressions initially (warn-only mode)

Automated evaluation by github-manager-bot

@qiansheng91 qiansheng91 added the enhancement New feature or request label Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants