2

While trying to profile performance of a simple .NET Core (v3.0) method with BenchmarkDotNet library (v0.11.5) with use of ConcurrencyVisualizerProfiler attribute put on a method/class which is being measured, I receive a CvTrace file as a result of the benchmark.

namespace ConsoleApp2
{
    [ConcurrencyVisualizerProfiler]
    public class BenchmarkTest
    {
        [Benchmark]
        public List<int> CalculatePrimesParallelly()
        {
            return ParallelEnumerable.Range(1, 100)
                .Where(i => IsPrime(i))
                .ToList();
        }
    }
}

When I try to open it with Visual Studio 2017 and Concurrency Visualizer for Visual Studio 2017 addon, I receive a message:

Collection cannot continue because kernel events were lost.

What should I do to get the data visualization?

Lucenty
  • 664
  • 1
  • 7
  • 18

1 Answers1

3

It's required to add

<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>

into .csproj file of project into <PropertyGroup> element.

After re-running the data is complete and the addon is able to load it.

Lucenty
  • 664
  • 1
  • 7
  • 18