Skip to content
Merged
Prev Previous commit
Next Next commit
PR responses
  • Loading branch information
Aaron Kunkle committed Mar 16, 2022
commit 261a6d5cb1e9864ab74fd616649ff7acbb965c6d
1 change: 1 addition & 0 deletions src/benchmarks/micro/MicroBenchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<!-- Used by Python script to narrow down the specified target frameworks to test, and avoid downloading all supported SDKs -->
<!-- Supported target frameworks -->
<TargetFrameworks>$(PERFLAB_TARGET_FRAMEWORKS)</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetFrameworks)' == '' AND '$(OS)' == 'Windows_NT'">net461;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<NoWarn>$(NoWarn);CS8002</NoWarn>
Expand Down
5 changes: 1 addition & 4 deletions src/benchmarks/micro/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ static int Main(string[] args)
Dictionary<string, object> parameterFilterValue;
bool getDiffableDisasm;

//Console.ReadLine();

// Parse and remove any additional parameters that we need that aren't part of BDN
try {
argsList = CommandLineOptions.ParseAndRemoveIntParameter(argsList, "--partition-count", out partitionCount);
Expand Down Expand Up @@ -55,8 +53,7 @@ static int Main(string[] args)
categoryExclusionFilterValue: categoryExclusionFilterValue,
parameterFilterValue: parameterFilterValue,
getDiffableDisasm: getDiffableDisasm)
.AddValidator(new NoWasmValidator(Categories.NoWASM))
.WithOptions(ConfigOptions.DisableOptimizationsValidator))
.AddValidator(new NoWasmValidator(Categories.NoWASM)))
.ToExitCode();
}
}
Expand Down
7 changes: 2 additions & 5 deletions src/harness/BenchmarkDotNet.Extensions/ParameterFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,15 @@ public ParameterFilter(Dictionary<string, object> parameterValues)
public bool Predicate(BenchmarkCase benchmarkCase)
{
Dictionary<string, object> items = benchmarkCase.Parameters.Items.ToDictionary<ParameterInstance, string, object>(instance => instance.Name, instance => instance.Value);
bool check = benchmarkCase.DisplayInfo.Contains("Perf");
bool check2 = benchmarkCase.DisplayInfo.Contains("Basic"); // Nothing contains "Basic"
bool check3 = benchmarkCase.DisplayInfo.Contains("Utf"); // Only covers Utf Encoding benchmarks
//*

foreach (string key in _parameterValues.Keys)
{
if (!items.Keys.Contains(key))
return false;
if (!items[key].Equals(_parameterValues[key]))
return false;
}
//*/

return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void NoBenchmarksAreOmitted_RealData()
for (int partitionIndex = 0; partitionIndex < PartitionCount; partitionIndex++)
{
PartitionFilter filter = new(PartitionCount, partitionIndex);
IEnumerable<BenchmarkCase> tmp = GetAllBenchmarks(parsedConfig, runnable).SelectMany(benchmark => benchmark.BenchmarksCases);

foreach (BenchmarkCase benchmark in GetAllBenchmarks(parsedConfig, runnable).SelectMany(benchmark => benchmark.BenchmarksCases))
{
if (filter.Predicate(benchmark))
Expand Down