Add Akka.Streams throughput benchmarks#8172
Merged
Aaronontheweb merged 2 commits intoApr 22, 2026
Merged
Conversation
Adds StreamThroughputBenchmarks with 4 benchmarks measuring element throughput for different stream topologies: - Linear_Pipeline_Throughput: Source → 2 Selects → Sink - Deep_Pipeline_5_Stages_Throughput: Source → 5 Selects → Sink - Merge_Fan_In_Throughput: 2 Sources → Merge → Sink - Batch_Fan_In_Throughput: Source → Batch → SelectMany → Sink These establish baseline throughput numbers before trace-context propagation is added in PR akkadotnet#8160. Uses OperationsPerInvoke to report per-element throughput.
Reports elements per second for easier throughput comparison between baseline and trace-context branches.
Member
Author
Akka.Streams Throughput Benchmark Results —
|
| Method | Mean | Error | StdDev | Req/sec | Gen0 | Gen1 | Allocated |
|---|---|---|---|---|---|---|---|
| Linear_Pipeline_Throughput | 106.33 ns | 2.030 ns | 2.172 ns | 9,404,712.54 | 0.0173 | - | 73 B |
| Deep_Pipeline_5_Stages_Throughput | 227.15 ns | 4.528 ns | 7.050 ns | 4,402,393.09 | 0.0344 | - | 145 B |
| Merge_Fan_In_Throughput | 89.43 ns | 1.731 ns | 2.370 ns | 11,181,861.31 | 0.0117 | 0.0002 | 49 B |
| Batch_Fan_In_Throughput | 190.96 ns | 3.747 ns | 5.833 ns | 5,236,621.08 | 0.0478 | - | 201 B |
Note: Benchmarks ran without elevated priority (
Permission deniedfor high priority). Results should still be representative for baseline comparison purposes.
4 tasks
Aaronontheweb
added a commit
that referenced
this pull request
Apr 24, 2026
* Add Akka.Streams throughput benchmarks for trace-context baseline Adds StreamThroughputBenchmarks with 4 benchmarks measuring element throughput for different stream topologies: - Linear_Pipeline_Throughput: Source → 2 Selects → Sink - Deep_Pipeline_5_Stages_Throughput: Source → 5 Selects → Sink - Merge_Fan_In_Throughput: 2 Sources → Merge → Sink - Batch_Fan_In_Throughput: Source → Batch → SelectMany → Sink These establish baseline throughput numbers before trace-context propagation is added in PR #8160. Uses OperationsPerInvoke to report per-element throughput. * Add ThroughputBenchmarkConfig with Req/sec column Reports elements per second for easier throughput comparison between baseline and trace-context branches.
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.
Summary
StreamThroughputBenchmarkswith 4 benchmarks measuring element throughput for different stream topologiesThroughputBenchmarkConfigthat includes Req/sec column for easier comparisonBenchmarks Added
Linear_Pipeline_ThroughputDeep_Pipeline_5_Stages_ThroughputMerge_Fan_In_ThroughputBatch_Fan_In_ThroughputSample Results (VM, expect better on bare metal)
Test plan