test(benchmarks): add C#/ASP.NET and TypeScript tasks

Six tasks with hidden checks: ASP.NET validation and 404 handling, C#
cancellation, and TypeScript overlap, deep merge, and debounce fixes, checked
with dotnet run and node --test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Julian lechnerandClaude Opus 5.5 committed 2026-10-01 13:59:12 +02:00
1 parent 97879fd6a5
commit f43a2df14b
30 files changed
+349 -2

No files matched your search

@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Reports\Reports.csproj" />
</ItemGroup>
</Project>
@@ -0,0 +1,20 @@
using System.Diagnostics;
using Reports;
var failures = new List<string>();
var builder = new ReportBuilder();
var complete = await builder.BuildAsync(new[] { "a", "b" });
if (complete != "## a\n## b") failures.Add($"unexpected output {complete}");
using var source = new CancellationTokenSource(TimeSpan.FromMilliseconds(150));
var watch = Stopwatch.StartNew();
try
{
await builder.BuildAsync(Enumerable.Range(0, 50).Select(number => number.ToString()), source.Token);
failures.Add("no cancellation");
}
catch (OperationCanceledException)
{
if (watch.ElapsedMilliseconds > 1000) failures.Add($"cancelled only after {watch.ElapsedMilliseconds} ms");
}
foreach (var failure in failures) Console.Error.WriteLine("FAIL " + failure);
return failures.Count == 0 ? 0 : 1;
@@ -0,0 +1,15 @@
namespace Reports;
public sealed class ReportBuilder
{
public async Task<string> BuildAsync(IEnumerable<string> sections, CancellationToken cancellationToken = default)
{
var parts = new List<string>();
foreach (var section in sections)
{
await Task.Delay(100);
parts.Add($"## {section}");
}
return string.Join("\n", parts);
}
}
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
</Project>
@@ -0,0 +1,13 @@
{
"prompt": "Cancelling a report build does nothing: BuildAsync keeps running until every section is rendered. Make it honor cancellation promptly by throwing OperationCanceledException.",
"check": [
"dotnet",
"run",
"--project",
"bench_hidden/Check",
"--nologo"
],
"workflow": {
"kind": "C#/ASP.NET change"
}
}