Skip to content

test: add 24-hour ShardedPulseMap soak example - #14

Open
VedantMadane wants to merge 1 commit into
ddsha441981:mainfrom
VedantMadane:test/issue-8-soak
Open

test: add 24-hour ShardedPulseMap soak example#14
VedantMadane wants to merge 1 commit into
ddsha441981:mainfrom
VedantMadane:test/issue-8-soak

Conversation

@VedantMadane

Copy link
Copy Markdown

Summary

Adds examples/soak_test.rs — a long-running endurance test for ShardedPulseMap under sustained concurrent load.

What it does

  • Configurable --duration <secs> (default 24 hours; short values for local/CI smoke)
  • 8 writer threads + 4 reader threads
  • ShardedPulseMap<u64, u64> with 4096 buckets/shard and set_ttl(10_000)
  • Stats every 60s (every 1s when duration < 2 minutes)
  • Checks: len() <= capacity(), monotonic eviction_count(), sentinel key integrity, Linux RSS growth ≤ 10%
  • Non-zero exit on failure / worker panic

How to run

\\�ash

Full 24h

cargo run --release --example soak_test --features std

Quick smoke

cargo run --release --example soak_test --features std -- --duration 5

1-hour CI-style run

cargo run --release --example soak_test --features std -- --duration 3600
\\

Test plan

  • cargo build --example soak_test --features std
  • cargo run --example soak_test --features std -- --duration 3 → PASSED (~4.3M ops)

Fixes #8

Add examples/soak_test.rs with configurable --duration (default 24h),
8 writers + 4 readers, TTL churn, periodic stats, sentinel integrity
checks, monotonic eviction_count, capacity bounds, and Linux RSS growth
detection. Short --duration values enable fast local/CI smoke runs.

Fixes ddsha441981#8

Signed-off-by: Vedant Madane <6527493+VedantMadane@users.noreply.github.com>
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.

Add 24-hour soak test for ConcurrentPulseMap and ShardedPulseMap

1 participant