Skip to content

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

Open
@yaskovdev

Description

@yaskovdev

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions