Skip to content

test(concurrent): run concurrency.cpp tests at small size by default - #433

Open
napetrov wants to merge 1 commit into
mainfrom
dev/napetrov/ci-concurrent-test-size
Open

napetrov wants to merge 1 commit into
mainfrom
dev/napetrov/ci-concurrent-test-size

Conversation

@napetrov

Copy link
Copy Markdown
Contributor

Part of #432

Summary

 // tests/svs/concurrent/concurrency.cpp
-#if TSan
-  small: 4000 + 1000 points, 50 queries
-#else
-  full:  20000 + 5000 points, 200 queries
+#if SVS_TEST_CONCURRENT_FULL_SIZE && !TSan
+  full:  20000 + 5000 points, 200 queries
+#else
+  small: 4000 + 1000 points, 50 queries
 #endif

New CMake option SVS_TEST_CONCURRENT_FULL_SIZE (default OFF, in tests/CMakeLists.txt) restores the full size for stress runs, e.g. a future nightly (#432).

Since #369, the four Concurrent MutableVamanaIndex stress tests make up more than half of serial ctest time, and they run in every x86/ARM/macOS matrix job, including ASAN Debug. Per-push CI cost went from 346 to 521 runner-minutes after #369 landed.

Evidence

Measured locally with taskset -c 0-3 (4 cores, the same as a GitHub-hosted runner), RelWithDebInfo, ctest -R "Concurrent MutableVamanaIndex":

Test Before (full) After (small)
batch iterator 214.6 s 42.5 s
search during mutation 131.6 s 24.7 s
quiescent recall 103.8 s 18.6 s
consolidate during search 96.5 s 19.5 s
6 tests total ~548 s 106.8 s
  • All 6 tests pass. With --repeat until-fail:5, 30 of 30 runs pass, so the coarse recall thresholds hold at small size.
  • The full serial suite drops by about 7 minutes per matrix job. The CI g++-11 log showed 1039 s for the full suite, 576 s of it in these four tests.
  • -DSVS_TEST_CONCURRENT_FULL_SIZE=ON adds the define to the tests target only, which I checked in flags.make.

Merge Danger

Door: two-way

Blast Radius: tests-only

🤖 Generated with Claude Code

The four Concurrent MutableVamanaIndex stress tests added in #369 build a
20k-point index with 8 threads. On 4-vCPU CI runners they take ~550 s of
serial ctest time, more than half the suite, in every matrix job.

Use the existing small (TSan) problem size by default and keep the full
size behind the new SVS_TEST_CONCURRENT_FULL_SIZE CMake option for stress
runs. Races and broken invariants show up just as readily at small size.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant