Skip to content
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
12 changes: 2 additions & 10 deletions sandbox/Benchmark/BenchmarkDotNet/Filters/ZLinqBenchmarkFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,11 @@ namespace Benchmark;
/// </summary>
public partial class ZLinqBenchmarkFilter : IFilter
{
[GeneratedRegex(@"Benchmark.ZLinq.*", RegexOptions.CultureInvariant)]
public static partial Regex ZLinqNamespaceRegex();

public virtual bool Predicate(BenchmarkCase benchmarkCase)
{
// Filter by namespace
var fullBenchmarkName = FullNameProvider.GetBenchmarkName(benchmarkCase);
var nameWithoutArgs = benchmarkCase.Descriptor.GetFilterName();

bool isMatched = ZLinqNamespaceRegex().IsMatch(fullBenchmarkName)
|| ZLinqNamespaceRegex().IsMatch(nameWithoutArgs);

if (!isMatched)
var ns = benchmarkCase.Descriptor.Type.Namespace!;
if (!ns.StartsWith("Benchmark.ZLinq"))
return false;

switch (benchmarkCase.Job.Id)
Expand Down
2 changes: 1 addition & 1 deletion sandbox/Benchmark/Benchmarks/DistinctBattle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public bool TryGetSpan(out ReadOnlySpan<TSource> span)
return false;
}

public bool TryCopyTo(Span<TSource> destination, Index offset) => false;
public bool TryCopyTo(scoped Span<TSource> destination, Index offset) => false;

public bool TryGetNext(out TSource current)
{
Expand Down