diff --git a/.github/workflows/frozen-concurrent-control.yml b/.github/workflows/frozen-concurrent-control.yml index 6440d16e8..ae5f4c6e7 100644 --- a/.github/workflows/frozen-concurrent-control.yml +++ b/.github/workflows/frozen-concurrent-control.yml @@ -5,6 +5,7 @@ on: pull_request: paths: - 'tools/FrozenConcurrentProbe/**' + - 'tools/FrozenMeasurementEvents.cs' - 'tools/FrozenAllocationReader/**' - 'Directory.Packages.props' - '.github/scripts/frozen_concurrent_control.py' @@ -64,6 +65,7 @@ jobs: results/ inputs/ tools/FrozenConcurrentProbe/ + tools/FrozenMeasurementEvents.cs tools/FrozenAllocationReader/ .diagnostic-tools/ .github/scripts/frozen_concurrent_control.py diff --git a/.github/workflows/frozen-fixture-control.yml b/.github/workflows/frozen-fixture-control.yml index 1ccab993a..e48aed23b 100644 --- a/.github/workflows/frozen-fixture-control.yml +++ b/.github/workflows/frozen-fixture-control.yml @@ -5,6 +5,9 @@ on: pull_request: paths: - 'tools/FrozenFixtureProbe/**' + - 'tools/FrozenAllocationReader/**' + - 'tools/FrozenMeasurementEvents.cs' + - 'Directory.Packages.props' - '.github/scripts/frozen_concurrent_control.py' - '.github/scripts/test_frozen_concurrent_control.py' - '.github/workflows/frozen-fixture-control.yml' @@ -30,6 +33,8 @@ jobs: uname -a > results/host.txt python3 -m unittest discover -s .github/scripts -p test_frozen_concurrent_control.py > results/verifier-tests.log 2>&1 dotnet build tools/FrozenFixtureProbe -c Release > results/probe-build.log 2>&1 + dotnet build tools/FrozenAllocationReader -c Release > results/reader-build.log 2>&1 + dotnet tool install dotnet-trace --tool-path .diagnostic-tools --version 10.0.750501 > results/trace-install.log 2>&1 - name: Download original inputs and run fixed-count ABBA env: GH_TOKEN: ${{ github.token }} @@ -43,6 +48,14 @@ jobs: python3 .github/scripts/frozen_concurrent_control.py "inputs/$run" tools/FrozenFixtureProbe/bin/Release/net10.0/FrozenFixtureProbe.dll "results/$run" || failed=1 done exit "$failed" + - name: Collect separate measured-region fixture profiles + if: always() + run: | + failed=0 + for run in 42306276036 42312305889; do + python3 .github/scripts/frozen_concurrent_control.py "inputs/$run" tools/FrozenFixtureProbe/bin/Release/net10.0/FrozenFixtureProbe.dll "results/$run-profiled" --trace-tool .diagnostic-tools/dotnet-trace --profile-reader tools/FrozenAllocationReader/bin/Release/net10.0/FrozenAllocationReader.dll || failed=1 + done + exit "$failed" - name: Retain all outcomes and executable inputs if: always() uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 @@ -52,5 +65,8 @@ jobs: results/ inputs/ tools/FrozenFixtureProbe/ + tools/FrozenMeasurementEvents.cs + tools/FrozenAllocationReader/ + .diagnostic-tools/ .github/scripts/frozen_concurrent_control.py retention-days: 90 diff --git a/tests/Relayer.Outbox.SqlServer.Tests/SqlServerFixture.cs b/tests/Relayer.Outbox.SqlServer.Tests/SqlServerFixture.cs index 0c5d815f3..bc51263c9 100644 --- a/tests/Relayer.Outbox.SqlServer.Tests/SqlServerFixture.cs +++ b/tests/Relayer.Outbox.SqlServer.Tests/SqlServerFixture.cs @@ -22,13 +22,19 @@ await _docker.RunAsync(["run", "--detach", "--rm", "--name", _name, "--publish", "--env", "ACCEPT_EULA=Y", "--env", "MSSQL_SA_PASSWORD=Relayer-test-2026!", "mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04"]); var port = (await _docker.RunAsync(["port", _name, "1433/tcp"])).Trim().Split(':')[^1]; - ConnectionString = $"Server=127.0.0.1,{port};User ID=sa;Password=Relayer-test-2026!;Encrypt=False;Connect Timeout=2;Pool Blocking Period=NeverBlock"; + ConnectionString = $"Server=127.0.0.1,{port};User ID=sa;Password=Relayer-test-2026!;Encrypt=False;Pool Blocking Period=NeverBlock"; + // Short readiness attempts must not become the timeout for concurrent test logins. + var readinessConnectionString = new SqlConnectionStringBuilder(ConnectionString) + { + ConnectTimeout = 2, + Pooling = false + }.ConnectionString; var deadline = Stopwatch.StartNew(); while (true) { try { - await using var connection = new SqlConnection(ConnectionString); + await using var connection = new SqlConnection(readinessConnectionString); await connection.OpenAsync(); return; } diff --git a/tools/FrozenConcurrentProbe/FrozenConcurrentProbe.csproj b/tools/FrozenConcurrentProbe/FrozenConcurrentProbe.csproj index 45f9335e6..0f24d3c53 100644 --- a/tools/FrozenConcurrentProbe/FrozenConcurrentProbe.csproj +++ b/tools/FrozenConcurrentProbe/FrozenConcurrentProbe.csproj @@ -6,4 +6,7 @@ false false + + + diff --git a/tools/FrozenConcurrentProbe/Program.cs b/tools/FrozenConcurrentProbe/Program.cs index dd2de9c45..ca4c61d7c 100644 --- a/tools/FrozenConcurrentProbe/Program.cs +++ b/tools/FrozenConcurrentProbe/Program.cs @@ -51,13 +51,3 @@ { await cleanup(); } - -[System.Diagnostics.Tracing.EventSource(Name = "Relayer-FrozenMeasurement")] -sealed class FrozenMeasurementEvents : System.Diagnostics.Tracing.EventSource -{ - internal static readonly FrozenMeasurementEvents Log = new(); - [System.Diagnostics.Tracing.Event(1)] - public void MeasurementStart() => WriteEvent(1); - [System.Diagnostics.Tracing.Event(2)] - public void MeasurementStop() => WriteEvent(2); -} diff --git a/tools/FrozenFixtureProbe/FrozenFixtureProbe.csproj b/tools/FrozenFixtureProbe/FrozenFixtureProbe.csproj index 45f9335e6..0f24d3c53 100644 --- a/tools/FrozenFixtureProbe/FrozenFixtureProbe.csproj +++ b/tools/FrozenFixtureProbe/FrozenFixtureProbe.csproj @@ -6,4 +6,7 @@ false false + + + diff --git a/tools/FrozenFixtureProbe/Program.cs b/tools/FrozenFixtureProbe/Program.cs index f21693bf3..7597176e2 100644 --- a/tools/FrozenFixtureProbe/Program.cs +++ b/tools/FrozenFixtureProbe/Program.cs @@ -47,12 +47,15 @@ async Task Run() GC.Collect(); GC.WaitForPendingFinalizers(); GC.Collect(); + // Keep phase markers outside the inclusive counter, as in the full-delivery probe. + FrozenMeasurementEvents.Log.MeasurementStart(); var allocated = GC.GetTotalAllocatedBytes(precise: true); var start = System.Diagnostics.Stopwatch.GetTimestamp(); long sum = 0; for (var i = 0; i < measuredBatches; i++) sum += await Batch(); var seconds = System.Diagnostics.Stopwatch.GetElapsedTime(start).TotalSeconds; var bytes = GC.GetTotalAllocatedBytes(precise: true) - allocated; + FrozenMeasurementEvents.Log.MeasurementStop(); if (sum != measuredBatches * 8L * 42) throw new InvalidOperationException($"Unexpected sum: {sum}."); Console.WriteLine(JsonSerializer.Serialize(new { diff --git a/tools/FrozenMeasurementEvents.cs b/tools/FrozenMeasurementEvents.cs new file mode 100644 index 000000000..851d8c3ad --- /dev/null +++ b/tools/FrozenMeasurementEvents.cs @@ -0,0 +1,9 @@ +[System.Diagnostics.Tracing.EventSource(Name = "Relayer-FrozenMeasurement")] +sealed class FrozenMeasurementEvents : System.Diagnostics.Tracing.EventSource +{ + internal static readonly FrozenMeasurementEvents Log = new(); + [System.Diagnostics.Tracing.Event(1)] + public void MeasurementStart() => WriteEvent(1); + [System.Diagnostics.Tracing.Event(2)] + public void MeasurementStop() => WriteEvent(2); +} diff --git a/website/docs/contributing/performance.md b/website/docs/contributing/performance.md index 1214698a8..1f5785104 100644 --- a/website/docs/contributing/performance.md +++ b/website/docs/contributing/performance.md @@ -437,3 +437,14 @@ original fixture, native scheduler and diagnostic driver together; its schedulin differs from full delivery. Variation here cannot identify the historical excess, and its totals must never be subtracted from end-to-end totals. The strict gate and production performance requirements remain unchanged. + +The fixture workflow also collects a **separate instrumented ABBA** using the same +`Relayer-FrozenMeasurement` phase events and `FrozenAllocationReader` as the full +delivery control. Markers remain outside the inclusive allocation counter; the +reader excludes setup and warmup. Retained measured-region stacks can distinguish +original handler, signal-channel and diagnostic-driver allocations within this +isolated workload. Weighted samples and missing-stack counts retain their existing +limits: these profiles cannot attribute the historical end-to-end excess, and +neither sample weights nor isolated totals may be subtracted from full delivery. +Untraced and instrumented results remain separate. Failed extraction preserves +raw captures, and every ABBA launch is attempted even after another launch fails.