-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
Currently following hierarchy are shown for BenchmarkDotNet.Samples when group by Project, Class.
It show unintended 0 and 6 grouping.
It's caused by following workaround code for Rider/R#. (#2494)
BenchmarkDotNet/src/BenchmarkDotNet.TestAdapter/BenchmarkCaseExtensions.cs
Lines 34 to 36 in 799ecfc
| // We use displayName as FQN to workaround the Rider/R# problem with FQNs processing | |
| // See: https://github.com/dotnet/BenchmarkDotNet/issues/2494 | |
| var fullyQualifiedName = displayName; |
It seems when FullyQualfiedName's dot(.) char. It's used for hierarchy separator.
So when job display name contains . char. It cause wrong grouping.
I've confirmed, It can be fixed by overwriting FQN value for VS.
But this workaround can't distinguish VS TestExplorer / Resharper's TestExplorer.
// Use benchmark method FQN on Visual Studio environment.
if (Environment.GetEnvironmentVariable("VSAPPIDNAME") != null)
{
var benchmarkMethodName = benchmarkCase.Descriptor.WorkloadMethod.Name;
var benchmarkFullMethodName = $"{fullClassName}.{benchmarkMethodName}";
fullyQualifiedName = benchmarkFullMethodName;
}Metadata
Metadata
Assignees
Labels
No labels
