test(grpc-data): #1094 perf harness measures the publish path per thread and polls a counter instead of copying 10k values

This commit is contained in:
Joseph Doherty
2026-12-04 14:37:59 -05:00
parent ec4eed337c
commit 77a78d5bd3
5 changed files with 116 additions and 7 deletions
@@ -58,6 +58,8 @@ internal sealed partial class DataSubscriptionSession : IDataSubscriptionTranspo
internal Action? SnapshotEndCommittedForTests { get; set; }
internal Action<int, int, int>? BeforeDirtyTickForTests { get; set; }
internal Action? AfterTickForTests { get; set; }
/// <summary>#1094: runs on the worker as a tick starts, so a harness can attribute the thread's allocations to the tick.</summary>
internal Action? BeforeTickForTests { get; set; }
/// <summary>Test seam: a frame met a full delivery window (the worker is about to wait for the reader).</summary>
internal Action? OutboundFullForTests { get; set; }
internal Action<DataItemHandle, long>? OnCandidateQueuedForTests { get; set; }
@@ -811,6 +813,7 @@ internal sealed partial class DataSubscriptionSession : IDataSubscriptionTranspo
[AsyncMethodBuilder(typeof(PoolingAsyncValueTaskMethodBuilder))]
private async ValueTask TickAsync()
{
BeforeTickForTests?.Invoke();
try
{
lock (_gate)