Struct GcStats
- Namespace
- BenchmarkDotNet.Engines
- Assembly
- BenchmarkDotNet.dll
public struct GcStats : IEquatable<GcStats>
- Implements
Fields
AllocationQuantum
public static readonly long AllocationQuantum
Field Value
Empty
public static readonly GcStats Empty
Field Value
Properties
Gen0Collections
public readonly int Gen0Collections { get; }
Property Value
Gen1Collections
public readonly int Gen1Collections { get; }
Property Value
Gen2Collections
public readonly int Gen2Collections { get; }
Property Value
TotalOperations
public readonly long TotalOperations { get; }
Property Value
Methods
Equals(GcStats)
public bool Equals(GcStats other)
Parameters
other
GcStats
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
obj
object
Returns
FromForced(int)
public static GcStats FromForced(int forcedFullGarbageCollections)
Parameters
forcedFullGarbageCollections
int
Returns
GetBytesAllocatedPerOperation(BenchmarkCase)
public long? GetBytesAllocatedPerOperation(BenchmarkCase benchmarkCase)
Parameters
benchmarkCase
BenchmarkCase
Returns
- long?
GetCollectionsCount(int)
public int GetCollectionsCount(int generation)
Parameters
generation
int
Returns
GetHashCode()
public override int GetHashCode()
Returns
GetTotalAllocatedBytes(bool)
returns total allocated bytes (not per operation)
public long? GetTotalAllocatedBytes(bool excludeAllocationQuantumSideEffects)
Parameters
excludeAllocationQuantumSideEffects
boolAllocation quantum can affecting some of our nano-benchmarks in non-deterministic way. when this parameter is set to true and the number of all allocated bytes is less or equal AQ, we ignore AQ and put 0 to the results
Returns
- long?
Parse(string)
public static GcStats Parse(string line)
Parameters
line
string
Returns
ReadFinal()
public static GcStats ReadFinal()
Returns
ReadInitial()
public static GcStats ReadInitial()
Returns
ToOutputLine()
public string ToOutputLine()
Returns
ToString()
public override string ToString()
Returns
WithTotalOperations(long)
public GcStats WithTotalOperations(long totalOperationsCount)
Parameters
totalOperationsCount
long
Returns
Operators
operator +(GcStats, GcStats)
public static GcStats operator +(GcStats left, GcStats right)
Parameters
Returns
operator -(GcStats, GcStats)
public static GcStats operator -(GcStats left, GcStats right)