You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/articles/configs/diagnosers.md
-1
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,6 @@ In BenchmarkDotNet, 1kB = 1024B, 1MB = 1024kB, and so on. The column Gen X means
86
86
87
87
* In order to not affect main results we perform a separate run if any diagnoser is used. That's why it might take more time to execute benchmarks.
88
88
* MemoryDiagnoser:
89
-
* Mono currently [does not](https://stackoverflow.com/questions/40234948/how-to-get-the-number-of-allocated-bytes-in-mono) expose any api to get the number of allocated bytes. That's why our Mono users will get `?` in Allocated column.
90
89
* In order to get the number of allocated bytes in cross platform way we are using `GC.GetAllocatedBytesForCurrentThread` which recently got [exposed](https://github.com/dotnet/corefx/pull/12489) for netcoreapp1.1. That's why BenchmarkDotNet does not support netcoreapp1.0 from version 0.10.1.
91
90
* MemoryDiagnoser is `99.5%` accurate about allocated memory when using default settings or Job.ShortRun (or any longer job than it).
@@ -143,9 +138,6 @@ public static GcStats FromForced(int forcedFullGarbageCollections)
143
138
144
139
privatestaticlong?GetAllocatedBytes()
145
140
{
146
-
if(RuntimeInformation.IsOldMono)// Monitoring is not available in Mono, see http://stackoverflow.com/questions/40234948/how-to-get-the-number-of-allocated-bytes-
147
-
returnnull;
148
-
149
141
// we have no tests for WASM and don't want to risk introducing a new bug (https://github.com/dotnet/BenchmarkDotNet/issues/2226)
150
142
if(RuntimeInformation.IsWasm)
151
143
returnnull;
@@ -155,36 +147,20 @@ public static GcStats FromForced(int forcedFullGarbageCollections)
155
147
// so we enforce GC.Collect here just to make sure we get accurate results
156
148
GC.Collect();
157
149
158
-
if(RuntimeInformation.IsFullFramework)// it can be a .NET app consuming our .NET Standard package
if(GcHelpers.CanUseMonitoringTotalAllocatedMemorySize)// Monitoring is not available in Mono, see http://stackoverflow.com/questions/40234948/how-to-get-the-number-of-allocated-bytes-
0 commit comments