Repository navigation
test(ipc): benchmark writes to the DSM shared memory tables - #2737
arjunguhaswe wants to merge 1 commit into
Conversation
Time the part of a DSM checkpoint or Kafka offset that runs in libdatadog on a PHP request's thread: a checkpoint for a pathway already in the bucket, the same from 4 writers at once, and a produce offset across 16 partitions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
📚 Documentation Check Results📦
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 02adb4fa2e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| start.wait(); | ||
| let started = Instant::now(); |
There was a problem hiding this comment.
Start timing before releasing concurrent writers
When the main benchmark thread is delayed after start.wait() returns, the worker threads have already been released and can perform some or even all of their iterations before this timestamp is captured. The measured duration then excludes an arbitrary portion of the workload, producing spuriously low and scheduler-dependent results; use separate ready/start synchronization so the timestamp is recorded before the workers begin.
Useful? React with 👍 / 👎.
🔒 Cargo Deny Results📦
|
❌ ErrorsYour PR has failed checks. Please review the issues below and take necessary action before merging. 🚦 3 Pipeline jobs failed
ℹ️ InfoNo other issues found (see more)🧪 All tests passed 🎯 Code Coverage (details) Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: 02adb4f | Docs | View more details | Give us feedback! |
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
What does this PR do?
Stacked on #2729. Adds criterion benchmarks (
libdd-ipc/benches/shm_dsm.rs) for the part of a DSM checkpoint or Kafka offset that runs in libdatadog on a PHP request's thread: the write into the sidecar's shared memory tables.dsm_checkpoint_table/add_existing_pathwaydsm_checkpoint_table/add_concurrent_writers/4dsm_backlog_table/add_produce_offset_partitions/16key:valuetags asddog_dsm_track_backlogdoesEach benchmark creates its table as the sidecar does and writes through a handle opened by name, as a worker does, so the check for a replaced table that workers make on every write is timed too.
Motivation
The PHP tracer's phpbench subjects (DataDog/dd-trace-php#4386) time whole checkpoints, of which the table write is under a tenth. A slowdown in the tables would be diluted there, and would only show once dd-trace-php bumps libdatadog. These run in this repo's CI for any PR that touches
libdd-ipc, including client stats changes to theshm_table.rsboth share.Additional Notes
in_flightcounter, which every write updates twice. Locally, a write takes about 10× as long with 4 writers as with one.add_existing_pathwayadd_concurrent_writers/4add_produce_offset_partitions/16libdd-ipckeeps its shard weight of 1 (about 30 s) inselect_bench_packages.sh: withipc's two subjects, that's five at CI's 6 s each.How to test the change?
🤖 Generated with Claude Code