diff --git a/src/Disruptor.PerfTests/PerfTestTypeSelector.cs b/src/Disruptor.PerfTests/PerfTestTypeSelector.cs index f194c06..02c3538 100644 --- a/src/Disruptor.PerfTests/PerfTestTypeSelector.cs +++ b/src/Disruptor.PerfTests/PerfTestTypeSelector.cs @@ -23,7 +23,7 @@ public List GetPerfTestTypes() if (_options.Target.Equals("all", StringComparison.OrdinalIgnoreCase)) return GetAllTestTypes(); - return GetMatchingTestTypes(_options.Target); + return GetMatchingTestTypes(_options.Target, LoadValidTestTypes()); } private List PrintAndSelectTestTypes() @@ -52,7 +52,7 @@ private List PrintAndSelectTestTypes() return new() { printableTypes[index].Type }; } - return GetMatchingTestTypes(target); + return GetMatchingTestTypes(target, testTypes); } private static void PrintGroup(int level, List types) @@ -66,7 +66,7 @@ private static void PrintGroup(int level, List types) foreach (var type in types.Where(x => x.Namespace.Length == level)) { - Console.WriteLine($"{padding}- {type.Index}: {type.Name}"); + Console.WriteLine($"{padding}{type.Index}: {type.Name}"); } } @@ -98,11 +98,11 @@ bool IsIncluded(Type type) } } - private static List GetMatchingTestTypes(string target) + private static List GetMatchingTestTypes(string target, List testTypes) { var regex = CreateTargetRegex(target); - return LoadValidTestTypes().Where(x => regex.IsMatch(x.Name)).ToList(); + return testTypes.Where(x => regex.IsMatch(x.Name)).ToList(); static Regex CreateTargetRegex(string target) {