Skip to content

Commit e3e6736

Browse files
DrewScogginsCopilot
andcommitted
Gate runtime-async behind 'runtimeasync' experiment
PR #5195 enabled the runtime-async language feature unconditionally for net11.0+ via `<Features>`. To avoid affecting baseline measurement runs, gate it behind the existing experiment infrastructure so it only takes effect in the dedicated experiment lane. - src/Directory.Build.targets: only set `runtime-async=on` when the `EnableRuntimeAsync` MSBuild property is `true` (in addition to the existing TFM check). - scripts/ci_setup.py: when `--experiment-name=runtimeasync` is passed, emit `EnableRuntimeAsync=true` as an env var so MSBuild picks it up as a property (matches the pattern used by the `jitoptrepeat` experiment). Verified locally: BDN dry runs against the BinaryDataPayload tests succeed both with and without the env var (18/18 benchmarks each). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f852d81 commit e3e6736

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

scripts/ci_setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,11 @@ def main(args: CiSetupArgs):
424424
if args.experiment_name == "jitoptrepeat":
425425
experiment_config = variable_format % ('DOTNET_JitOptRepeat', '*')
426426

427+
if args.experiment_name == "runtimeasync":
428+
# Surfaced to MSBuild as the $(EnableRuntimeAsync) property; gates the
429+
# runtime-async Features flag in src/Directory.Build.targets.
430+
experiment_config = variable_format % ('EnableRuntimeAsync', 'true')
431+
427432
output = ''
428433

429434
with push_dir(get_repo_root_path()):

src/Directory.Build.targets

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
<Import Project="../Directory.Build.targets" />
33

44
<PropertyGroup>
5-
<Features Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net11.0'))">$(Features);runtime-async=on</Features>
5+
<!-- Runtime-async is gated behind the 'runtimeasync' experiment so it only runs
6+
in the dedicated experiment lane. ci_setup.py sets EnableRuntimeAsync=true as
7+
an env var (which MSBuild surfaces as a property) when the experiment name
8+
is 'runtimeasync'. -->
9+
<Features Condition="'$(EnableRuntimeAsync)' == 'true' and $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net11.0'))">$(Features);runtime-async=on</Features>
610
</PropertyGroup>
711
</Project>

0 commit comments

Comments
 (0)