BenchmarkDotNet icon indicating copy to clipboard operation
BenchmarkDotNet copied to clipboard

"Allocated native memory" and "Native memory leak" show wrong values if I use KeepBenchmarkFiles

Open yaskovdev opened this issue 3 years ago • 0 comments
trafficstars

Steps to reproduce:

  1. Clone the solution.
  2. Open PowerShell in the same directory as BenchmarkDotNetBug.sln as an admin.
  3. Run .\BuildAndRun.ps1.
  4. Wait a few minutes for the benchmark to finish.

Expected: both "Allocated native memory" and "Native memory leak" are "10 B". Actual: both "Allocated native memory" and "Native memory leak" are "-".

Remove KeepBenchmarkFiles attribute from MemoryLeak class and run again. This time everything works as expected.

// Benchmark Process Environment Information: // Runtime=.NET 6.0.8 (6.0.822.36306), X64 RyuJIT AVX2 // GC=Concurrent Workstation // HardwareIntrinsics=AVX2,AES,BMI1,BMI2,FMA,LZCNT,PCLMUL,POPCNT VectorSize=256 // Job: DefaultJob

yaskovdev avatar Sep 09 '22 23:09 yaskovdev