Rebuild the benchmark suite for the .NET 10 performance spike#2335
Open
HowardvanRooijen wants to merge 2 commits into
Open
Rebuild the benchmark suite for the .NET 10 performance spike#2335HowardvanRooijen wants to merge 2 commits into
HowardvanRooijen wants to merge 2 commits into
Conversation
Replace the legacy ad-hoc benchmarks with a categorised BenchmarkDotNet suite (~100 operator classes across 18 categories, full operator facade coverage) designed as the measurement foundation for before/after performance work. Suite architecture: - Four scenario archetypes: S1 cold throughput (N swept 1..1M), S2 hot subject push, S3 temporal operators driven in virtual time, and S4 construction/subscription/disposal lifecycle. - Shared infrastructure: global MemoryDiagnoser and full-JSON export, Consumer-backed sinks (defeat dead-code elimination, consume errors), blocking observers for async pipelines, virtual-time sources, and faulting sources for error-pathway benchmarks. - PeriodicVirtualScheduler: a virtual-time ISchedulerPeriodic (with the GetService override required for discovery), so Interval, Timer, Sample, Buffer(time) and Window(time) measure Rx's real periodic fast path; Interval_EmulatedPeriodic retains the emulated fallback for comparison. - Per-element ns/N and B/N summary columns, computed from the N param (OperationsPerInvoke cannot bind to params), so steady-state per-element cost and per-element allocations read directly off every results table. Tooling and workflow: - tools/capture-baseline.ps1 stamps runs into commit-addressed baseline folders with the captured environment; tools/compare-results.ps1 diffs two result sets by benchmark full name and classifies regressions/improvements using a ratio threshold plus confidence-interval overlap, reporting allocation changes separately. - Rx.WorkloadHarness: a long-running soak host for dotnet-counters / dotnet-trace steady-state telemetry that microbenchmarks cannot show. - README documents the layout, archetypes, running/filtering/profiling, and the A/B workflow. Run outputs and local planning notes stay untracked. The suite always measures the current in-repo sources via project references (no test-project/MSTest dependency); the old Rx 3.1.1/4.0 cross-version build configurations are gone, replaced by the cross-run capture/compare workflow. The 6.x-era root benchmark classes were relocated into the categorised tree and converted to suite conventions, with the redundant async comparison folded into the Concurrency benchmarks.
There was a problem hiding this comment.
Pull request overview
This PR replaces the legacy Rx.NET ad-hoc benchmark set with a structured BenchmarkDotNet-based suite (categorized operator coverage + shared infrastructure), adds baseline capture/compare tooling, and introduces a long-running workload harness to support runtime-level performance investigations (e.g., .NET 10 spike work).
Changes:
- Reworked
Benchmarks.System.Reactiveinto a categorized, auto-discovered BenchmarkDotNet suite with shared infrastructure (virtual time sources/schedulers, sinks, per-element columns, global config). - Added benchmark workflow tooling (
capture-baseline.ps1,compare-results.ps1) plus documentation and gitignores for local artifacts. - Added
Rx.WorkloadHarnessconsole host for sustained pipelines suitable fordotnet-counters/dotnet-tracetelemetry.
Reviewed changes
Copilot reviewed 135 out of 136 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| Rx.NET/Source/System.Reactive.slnx | Updates solution structure to include the benchmark suite + workload harness projects. |
| Rx.NET/Source/benchmarks/tools/compare-results.ps1 | Adds result-set diffing/reporting for before/after benchmark runs. |
| Rx.NET/Source/benchmarks/tools/capture-baseline.ps1 | Adds a baseline-capture wrapper that stamps results with commit/environment metadata. |
| Rx.NET/Source/benchmarks/Rx.WorkloadHarness/Rx.WorkloadHarness.csproj | Introduces the long-running workload harness project. |
| Rx.NET/Source/benchmarks/Rx.WorkloadHarness/Program.cs | Implements sustained Rx pipelines + CLI options for telemetry-friendly runs. |
| Rx.NET/Source/benchmarks/README.md | Documents suite layout, scenarios, and A/B workflow. |
| Rx.NET/Source/benchmarks/.gitignore | Ignores benchmark outputs (baselines/traces/artifacts) and local notes. |
| .gitignore | Adds a repo-level ignore for BenchmarkDotNet artifacts under Rx.NET/Source. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Benchmarks.System.Reactive.csproj | Moves to multi-TFM, drops test-project dependencies, and references in-repo product projects directly. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Program.cs | Switches to assembly auto-discovery and applies shared BenchmarkDotNet config. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/ZipBenchmark.cs | Removes legacy benchmark (superseded by categorized operator benchmarks). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/ToObservableBenchmark.cs | Removes legacy benchmark (replaced by Operators/Conversions/ToObservableBenchmarks). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/SwitchBenchmark.cs | Removes legacy benchmark (replaced by Operators/Multiple/SwitchBenchmarks). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/SubjectBenchmark.cs | Removes legacy benchmark (replaced by Operators/Hot/SubjectBenchmarks). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/ScalarScheduleBenchmark.cs | Removes legacy benchmark (suite uses new infra + categorized scenarios). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/RepeatBenchmark.cs | Removes legacy benchmark (replaced by Operators/Creation/RepeatBenchmarks). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/RangeBenchmark.cs | Removes legacy benchmark (replaced by Operators/Creation/RangeBenchmarks). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/PrependVsStartWtihBenchmark.cs | Removes legacy conditional benchmark (replaced by lifecycle/construction coverage). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/GroupByCompletion.cs | Removes legacy benchmark (suite now measures GroupBy scenarios via categorized benchmarks). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/ComparisonBenchmark.cs | Removes legacy comparison grid (replaced by Operators/Overhead/ComparisonBenchmarks). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/ComparisonAsyncBenchmark.cs | Removes legacy async comparison (replaced by categorized Concurrency benchmarks). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/CombineLatestBenchmark.cs | Removes legacy benchmark (replaced by Operators/Multiple/CombineLatestBenchmarks). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/BufferCountBenchmark.cs | Removes legacy benchmark (replaced by Operators/Single/BufferCountBenchmarks). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/AppendPrependBenchmark.cs | Removes legacy benchmark (replaced by Operators/Single/AppendPrependStartWithBenchmarks + lifecycle benchmarks). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Infrastructure/BenchmarkBase.cs | Adds base benchmark root with shared Consumer. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Infrastructure/OperatorBenchmarkBase.cs | Adds S1 throughput base with N sweep. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Infrastructure/TemporalBenchmarkBase.cs | Adds S3 temporal base for virtual-time benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Infrastructure/RateWindowBenchmarkBase.cs | Adds density/window regime parameterization for rate/window temporal operators. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Infrastructure/VirtualTimeSource.cs | Adds allocation-light virtual-time source factories for temporal scenarios. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Infrastructure/PeriodicVirtualScheduler.cs | Adds virtual-time ISchedulerPeriodic implementation to hit Rx periodic fast paths. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Infrastructure/Sinks.cs | Adds Consumer-backed sinks + blocking observer for async pipelines. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Infrastructure/FaultingSource.cs | Adds shared faulting sources for error-pathway benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Infrastructure/PerElementColumn.cs | Adds display-only per-element time/allocation columns derived from N. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Infrastructure/RxBenchmarkConfig.cs | Adds shared BDN config (MemoryDiagnoser + full JSON exporter + custom columns). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Time/ThrottleBenchmarks.cs | Adds temporal Throttle benchmark driven in virtual time. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Time/SampleBenchmarks.cs | Adds temporal Sample(TimeSpan) benchmark on periodic virtual scheduler. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Time/BufferTimeBenchmarks.cs | Adds temporal Buffer(TimeSpan) benchmark on periodic virtual scheduler. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Time/WindowTimeBenchmarks.cs | Adds temporal Window(TimeSpan) benchmark with inner flattening. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Time/BufferWindowBoundaryBenchmarks.cs | Adds observable-boundary Buffer/Window temporal benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Time/TimerIntervalBenchmarks.cs | Adds Interval/Timer periodic-path benchmarks + timed Generate source benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Time/TimestampTimeIntervalBenchmarks.cs | Adds Timestamp/TimeInterval temporal annotation benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Time/DelayBenchmarks.cs | Adds Delay/DelaySubscription temporal benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Time/TimeoutBenchmarks.cs | Adds Timeout benchmarks for never-trip, trip-to-fallback, and error path. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Time/SkipTakeTimeBenchmarks.cs | Adds time-based Skip/Take/SkipLast/TakeLast temporal benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Time/SkipUntilTakeUntilBenchmarks.cs | Adds absolute-time SkipUntil/TakeUntil temporal benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Time/TimeOverloadGapsBenchmarks.cs | Adds remaining temporal overload-shape coverage (selector-based delay/timeout, etc.). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/StandardSequence/SelectBenchmarks.cs | Adds S1 Select throughput benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/StandardSequence/WhereBenchmarks.cs | Adds S1 Where throughput benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/StandardSequence/TakeSkipBenchmarks.cs | Adds S1 Take/Skip plus predicate-based TakeWhile/SkipWhile. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/StandardSequence/SelectManyBenchmarks.cs | Adds cross-mapped SelectMany fan-out benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/StandardSequence/DistinctBenchmarks.cs | Adds Distinct benchmarks (unique stream + key selector). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/StandardSequence/GroupByBenchmarks.cs | Adds GroupBy benchmark with fixed key count. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/StandardSequence/GroupByUntilBenchmarks.cs | Adds GroupByUntil benchmark with per-group duration. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/StandardSequence/JoinGroupJoinBenchmarks.cs | Adds Join/GroupJoin benchmarks under controlled virtual time overlap. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/StandardSequence/ReferenceTypeElementBenchmarks.cs | Adds reference-type payload benchmarks for GC-sensitive operators. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/StandardSequence/BoxingBenchmarks.cs | Adds boxed vs unboxed pipeline benchmark to isolate boxing/unboxing cost. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/StandardSequence/CastOfTypeBenchmarks.cs | Adds Cast/OfType benchmarks over boxed source. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/StandardSequence/DefaultIfEmptyBenchmarks.cs | Adds DefaultIfEmpty benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Single/ScanBenchmarks.cs | Adds Scan benchmark as single-sequence exemplar. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Single/BufferCountBenchmarks.cs | Adds count-based Buffer benchmarks (exact + skip). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Single/WindowCountBenchmarks.cs | Adds count-based Window benchmark with flattening. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Single/TakeLastSkipLastBenchmarks.cs | Adds last-N family benchmarks (TakeLast/SkipLast/TakeLastBuffer). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Single/RetryRepeatBenchmarks.cs | Adds Retry/Repeat + error-driven Retry benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Single/RepeatWhenRetryWhenBenchmarks.cs | Adds RepeatWhen/RetryWhen benchmarks including error path. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Single/ResetExceptionDispatchStateBenchmarks.cs | Adds ResetExceptionDispatchState benchmarks incl. error scenario. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Single/MaterializeBenchmarks.cs | Adds Materialize/Dematerialize and Materialize error-path benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Single/DoFinallyBenchmarks.cs | Adds Do/Finally benchmarks plus error-path variants. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Single/IgnoreElementsBenchmarks.cs | Adds IgnoreElements benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Single/DistinctUntilChangedBenchmarks.cs | Adds DistinctUntilChanged benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Single/AsObservableBenchmarks.cs | Adds AsObservable benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Single/AppendPrependStartWithBenchmarks.cs | Adds Append/Prepend/StartWith benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Overhead/OverheadBenchmarks.cs | Adds “cost of Rx” reference benchmark vs for-loop and LINQ. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Overhead/ComparisonBenchmarks.cs | Retains/modernizes broad comparison grid using suite sinks/config. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Multiple/AmbBenchmarks.cs | Adds Amb benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Multiple/CatchBenchmarks.cs | Adds Catch/OnErrorResumeNext benchmarks incl. error-driven variants. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Multiple/CombineLatestBenchmarks.cs | Adds binary CombineLatest benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Multiple/CombineLatestManyBenchmarks.cs | Adds N-ary CombineLatest benchmark sweeping source count. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Multiple/ConcatBenchmarks.cs | Adds Concat benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Multiple/InterleavedCombiningBenchmarks.cs | Adds interleaved two-source combiners under a shared virtual clock. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Multiple/MergeBenchmarks.cs | Adds Merge benchmark sweeping source count. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Multiple/MergeMaxConcurrencyBenchmarks.cs | Adds Merge(maxConcurrency) benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Multiple/SkipUntilObservableBenchmarks.cs | Adds observable-triggered SkipUntil benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Multiple/SwitchBenchmarks.cs | Adds cross-mapped Switch benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Multiple/WithLatestFromBenchmarks.cs | Adds WithLatestFrom benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Multiple/ZipBenchmarks.cs | Adds binary Zip benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Multiple/ZipManyBenchmarks.cs | Adds N-ary Zip benchmark sweeping source count. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Lifecycle/ConstructionBenchmarks.cs | Adds construction-vs-subscription decomposition benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Lifecycle/DisposeBenchmarks.cs | Adds mid-stream disposal benchmarks for live subscriptions. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Lifecycle/StableCompositeDisposableBenchmarks.cs | Moves/updates StableCompositeDisposable benchmarks into lifecycle category. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Joins/AndThenWhenBenchmarks.cs | Adds join-calculus (And/Then/When) benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Imperative/ImperativeBenchmarks.cs | Adds For/While/DoWhile imperative combinator benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Imperative/IfBenchmarks.cs | Adds If benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Imperative/CaseForEachAsyncBenchmarks.cs | Adds Case and ForEachAsync benchmarks with monitoring job. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Hot/HotSourceBenchmarks.cs | Adds hot-subject-driven operator benchmarks (push-path focus). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Hot/SubjectBenchmarks.cs | Adds subject-variant push benchmarks with subscriber count sweep. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Events/FromEventBenchmarks.cs | Adds FromEvent/FromEventPattern event-bridging benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Creation/ScalarCreationBenchmarks.cs | Adds scalar factory subscription-cost benchmarks (Return/Empty/Throw). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Creation/RangeBenchmarks.cs | Adds Range creation benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Creation/RepeatBenchmarks.cs | Adds Repeat(value,count) benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Creation/GenerateBenchmarks.cs | Adds Generate (untimed) benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Creation/CreateBenchmarks.cs | Adds Create benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Creation/DeferBenchmarks.cs | Adds Defer benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Creation/DeferAsyncBenchmarks.cs | Adds DeferAsync benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Creation/UsingBenchmarks.cs | Adds Using benchmarks incl. error-path. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Conversions/ToObservableBenchmarks.cs | Adds ToObservable conversion benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Conversions/ToTaskBenchmarks.cs | Adds ToTask conversion benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Conversions/ToEnumerableBenchmarks.cs | Adds ToEnumerable conversion benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Conversions/ToEventBenchmarks.cs | Adds ToEvent/ToEventPattern and IEnumerable.Subscribe benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Concurrency/SynchronizeBenchmarks.cs | Adds Synchronize locking-cost benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Concurrency/ObserveOnBenchmarks.cs | Adds ObserveOn benchmarks with monitoring job. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Concurrency/SubscribeOnBenchmarks.cs | Adds SubscribeOn benchmark with monitoring job. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Blocking/BlockingBenchmarks.cs | Adds Wait blocking benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Blocking/BlockingPullBenchmarks.cs | Adds remaining blocking gate/pull operator benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Blocking/FirstLastBenchmarks.cs | Adds blocking First/Last benchmarks (obsolete APIs intentionally). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Blocking/ForEachBenchmarks.cs | Adds blocking ForEach benchmark (obsolete API intentionally). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Blocking/HotPullBenchmarks.cs | Adds hot-source blocking pull benchmarks (Latest/MostRecent/Next/Chunkify). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Binding/PublishBenchmarks.cs | Adds Publish multicast benchmark sweeping subscribers. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Binding/PublishLastBenchmarks.cs | Adds PublishLast benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Binding/RefCountBenchmarks.cs | Adds Publish().RefCount() benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Binding/ReplayBenchmarks.cs | Adds Replay benchmark sweeping buffer size + subscribers. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Binding/MulticastAutoConnectBenchmarks.cs | Adds Multicast and AutoConnect benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Binding/LateSubscriberBenchmarks.cs | Adds late-subscriber Replay + RefCount churn scenarios. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Awaiter/AwaiterBenchmarks.cs | Adds RunAsync/GetAwaiter benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Async/AsyncFactoryBenchmarks.cs | Adds async factory bridge benchmarks (FromAsync/Start/StartAsync/ToAsync). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Async/FromAsyncPatternBenchmarks.cs | Adds FromAsyncPattern benchmark via hand-rolled IAsyncResult. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Aggregates/AggregateBenchmarks.cs | Adds Aggregate benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Aggregates/CountQuantifierBenchmarks.cs | Adds Count/Any/All/Contains benchmarks (worst-case scan predicates). |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Aggregates/ElementAtBenchmarks.cs | Adds ElementAt/ElementAtOrDefault benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Aggregates/FirstLastSingleAsyncBenchmarks.cs | Adds non-blocking *Async selector benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Aggregates/IsEmptyLongCountBenchmarks.cs | Adds IsEmpty and LongCount benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Aggregates/MinByMaxByBenchmarks.cs | Adds MinBy/MaxBy benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Aggregates/MinMaxAverageBenchmarks.cs | Adds Min/Max/Average benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Aggregates/SequenceEqualBenchmarks.cs | Adds SequenceEqual benchmark. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Aggregates/SumBenchmarks.cs | Adds Sum benchmark with long projection. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Aggregates/ToDictionaryToLookupBenchmarks.cs | Adds ToDictionary/ToLookup benchmarks. |
| Rx.NET/Source/benchmarks/Benchmarks.System.Reactive/Operators/Aggregates/ToListToArrayBenchmarks.cs | Adds ToList/ToArray benchmarks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+66
to
+73
| $map[$b.FullName] = [pscustomobject]@{ | ||
| FullName = $b.FullName | ||
| Mean = [double]$stats.Mean | ||
| CiLower = [double]$stats.ConfidenceInterval.Lower | ||
| CiUpper = [double]$stats.ConfidenceInterval.Upper | ||
| Allocated = $allocated | ||
| N = $n | ||
| } |
Comment on lines
+20
to
+21
| var n = N; | ||
| Observable.Defer(() => Observable.Range(1, n)).SubscribeConsume(Consumer); |
Comment on lines
+21
to
+22
| var n = N; | ||
| Observable.DeferAsync(_ => Task.FromResult(Observable.Range(1, n))).SubscribeConsume(Consumer); |
Comment on lines
+24
to
+25
| var n = N; | ||
| Observable.Using(static () => Disposable.Empty, _ => Observable.Range(1, n)).SubscribeConsume(Consumer); |
Comment on lines
+31
to
+32
| var n = N; | ||
| Observable.Using(static () => Disposable.Empty, _ => FaultingSource.Faulting(n)).SubscribeConsume(Consumer); |
Comment on lines
+26
to
+27
| var n = N; | ||
| Observable.Range(1, 2 * N).TakeWhile(v => v <= n).SubscribeConsume(Consumer); |
Comment on lines
+33
to
+34
| var n = N; | ||
| Observable.Range(1, 2 * N).SkipWhile(v => v <= n).SubscribeConsume(Consumer); |
Comment on lines
+29
to
+30
| var n = N; | ||
| Observable.While(() => i++ < n, Observable.Return(1)).SubscribeConsume(Consumer); |
Comment on lines
+37
to
+38
| var n = N; | ||
| Observable.DoWhile(Observable.Return(1), () => ++i < n).SubscribeConsume(Consumer); |
Comment on lines
+70
to
+74
| var n = N; | ||
| var period = TimeSpan.FromTicks(PeriodTicks); | ||
|
|
||
| Observable.Generate(0, i => i < n, i => i + 1, i => i, _ => period, scheduler) | ||
| .SubscribeConsume(Consumer); |
capture-baseline.ps1 sanitizes -Label to a safe filename segment so it cannot inject path separators or '..' into the baseline folder path. Rx.WorkloadHarness validates --rate-ms and --seconds up front and fails fast with a clear message instead of throwing from Observable.Interval or the auto-stop timer. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Replace the legacy ad-hoc benchmarks with a categorised BenchmarkDotNet suite (~100 operator classes across 18 categories, full operator facade coverage) designed as the measurement foundation for before/after performance work.
Suite architecture:
Tooling and workflow:
The suite always measures the current in-repo sources via project references (no test-project/MSTest dependency); the old Rx 3.1.1/4.0 cross-version build configurations are gone, replaced by the cross-run capture/compare workflow. The 6.x-era root benchmark classes were relocated into the categorised tree and converted to suite conventions, with the redundant async comparison folded into the Concurrency benchmarks.
Hello and thank you for contributing to dotnet/reactive. Before you proceed by creating a pull request (PR):
What is the nature of your contribution?
Bugfix
Enhancement
Feature request