Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for Empty ASP.NET Benchmark Filters + Documentation #3870

Merged
merged 3 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ public static AspNetBenchmarkResults RunASPNetBenchmarks(ASPNetBenchmarksConfigu
}
}
}

if (benchmarkToNameCommandAsKvpList.Count == 0)
{
throw new ArgumentException($"{nameof(AspNetBenchmarksCommand)}: No benchmark filters found. Please ensure you have added the wildcard character to do the regex matching. Benchmark Filter: {configuration.benchmark_settings.benchmarkFilters}");
}
}

// Else, add all the benchmarks.
Expand Down
13 changes: 13 additions & 0 deletions src/benchmarks/gc/GC.Infrastructure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,19 @@ It's worth noting that if you have specified Linux based binaries in the corerun
1. Remove the ``crank`` prefix from the command line.
2. Remove the ``--application.aspNetCoreVersion``, ``--application.runtimeVersion`` and ``--application.sdkVersion`` command args from the command line that you paste in the CSV as the versions are set by the infrastructure itself.

###### How To Filter Benchmarks

You can filter benchmarks of interest from the entire set of benchmarks specified by the referenced `benchmarks_file` using a list of regex patterns such as the following in the `benchmark_settings` section:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wording nit - The use of * is a wildcard pattern rather than a regex. I assume that Foo* is such a common pattern that you don't want to only support regexes (Foo.*), but it makes explanation difficult. (see also the exception message and that the implementation doesn't handle something like Foo*Bar* as might be expected or ? - I assume that you don't want to dive into more implementation on this, so maybe something like "regex or pattern with trailing * wildcard" is good enough?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree - will update this in the next round of doc changes. Thanks!


```yaml
benchmark_settings:
benchmark_filters:
- Stage1Aot_Windows*
- PlainText*
```

If there is a match, these filters will run in the order specified in the yaml file.

## All Commands

The infrastructure can be run in modular manner. What this means is that you can invoke a particular command that runs some part of the infrastructure. A list of all the commands can be found here:
Expand Down
Loading