[chore][processor/dynamic_sampling] add concurrent ConsumeTraces benchmarks - #50047
Merged
ChrsMark merged 2 commits intoAug 5, 2026
Merged
Conversation
Assisted-by: Claude Fable 5
10 tasks
Pull request dashboard statusMerged · refreshed 2026-08-05 10:38 UTC Status above doesn't look right?
|
1 task
jmacd
approved these changes
Aug 4, 2026
ChrsMark
approved these changes
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
All existing benchmarks drive
ConsumeTracesfrom a single goroutine, but the collector calls it concurrently from receivers and pipelines, and the processor serializes most of its work behind one mutex. This adds concurrent benchmarks so multi-core scaling is measured rather than assumed, and gives the planned lock-restructuring work a baseline and acceptance test.BenchmarkConsumeTraces_Parallelcovers the steady-state paths (new traces, appends to pending traces, decision-cache hits for both outcomes) andBenchmarkConsumeTraces_ParallelMixedruns ingest racing timer-driven decisions. Run with-cpu=1,4,8,16. The file header documents a-mutexprofilerecipe for attributing lock wait.Measured today (spans/sec, mean of 3, Apple M4 Pro):
The numbers show the ceiling clearly. Every path stops scaling at 4 cores, the cheapest path (cache-hit drop) gets slower under contention, and the mixed workload regresses past 4 cores once decision timers compete for the same lock.
Link to tracking issue
Refs #49311
Testing
Documentation
Run instructions and interpretation guidance are in the file header. Test-only change, no changelog entry.
Authorship