BenchmarkDotNet
BenchmarkDotNet copied to clipboard
"Allocated native memory" and "Native memory leak" show wrong values if I use KeepBenchmarkFiles
trafficstars
Steps to reproduce:
- Clone the solution.
- Open PowerShell in the same directory as
BenchmarkDotNetBug.slnas an admin. - Run
.\BuildAndRun.ps1. - 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