From e9bd7b2d912bdc982685b07e5be939438407aac5 Mon Sep 17 00:00:00 2001 From: Drew Scoggins Date: Tue, 28 Apr 2026 15:58:15 -0700 Subject: [PATCH] Exclude Perf_String.Split_Csv from WASM runs The Split_Csv benchmark reads CSV test data files via File.ReadAllLines from AppContext.BaseDirectory. These files are not bundled into the WASM publish output, so CsvCorpus() throws DirectoryNotFoundException when BDN extracts arguments in the spawned WASM benchmark process. Add [BenchmarkCategory(Categories.NoWASM)] to skip the benchmark on WASM, matching the existing pattern used for other filesystem-dependent benchmarks in this repo. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/benchmarks/micro/libraries/System.Runtime/Perf.String.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/benchmarks/micro/libraries/System.Runtime/Perf.String.cs b/src/benchmarks/micro/libraries/System.Runtime/Perf.String.cs index 4622f970fd7..357052a8d39 100644 --- a/src/benchmarks/micro/libraries/System.Runtime/Perf.String.cs +++ b/src/benchmarks/micro/libraries/System.Runtime/Perf.String.cs @@ -321,6 +321,7 @@ public static string[] ReadInputFile(string name) => File.ReadAllLines(Path.Combine(AppContext.BaseDirectory, "libraries", "System.Runtime", "TestData", name)); [Benchmark] + [BenchmarkCategory(Categories.NoWASM)] // CSV files in TestData are not available in WASM filesystem [ArgumentsSource(nameof(CsvCorpus))] public string[] Split_Csv(string testName, string[] lines) {