Table of Contents

Struct GcStats

Namespace
BenchmarkDotNet.Engines
Assembly
BenchmarkDotNet.dll
public struct GcStats : IEquatable<GcStats>
Implements

Fields

AllocationQuantum

public static readonly long AllocationQuantum

Field Value

long

Empty

public static readonly GcStats Empty

Field Value

GcStats

Properties

Gen0Collections

public readonly int Gen0Collections { get; }

Property Value

int

Gen1Collections

public readonly int Gen1Collections { get; }

Property Value

int

Gen2Collections

public readonly int Gen2Collections { get; }

Property Value

int

TotalOperations

public readonly long TotalOperations { get; }

Property Value

long

Methods

Equals(GcStats)

public bool Equals(GcStats other)

Parameters

other GcStats

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

FromForced(int)

public static GcStats FromForced(int forcedFullGarbageCollections)

Parameters

forcedFullGarbageCollections int

Returns

GcStats

GetBytesAllocatedPerOperation(BenchmarkCase)

public long? GetBytesAllocatedPerOperation(BenchmarkCase benchmarkCase)

Parameters

benchmarkCase BenchmarkCase

Returns

long?

GetCollectionsCount(int)

public int GetCollectionsCount(int generation)

Parameters

generation int

Returns

int

GetHashCode()

public override int GetHashCode()

Returns

int

GetTotalAllocatedBytes(bool)

returns total allocated bytes (not per operation)

public long? GetTotalAllocatedBytes(bool excludeAllocationQuantumSideEffects)

Parameters

excludeAllocationQuantumSideEffects bool

Allocation 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

GcStats

ReadFinal()

public static GcStats ReadFinal()

Returns

GcStats

ReadInitial()

public static GcStats ReadInitial()

Returns

GcStats

ToOutputLine()

public string ToOutputLine()

Returns

string

ToString()

public override string ToString()

Returns

string

WithTotalOperations(long)

public GcStats WithTotalOperations(long totalOperationsCount)

Parameters

totalOperationsCount long

Returns

GcStats

Operators

operator +(GcStats, GcStats)

public static GcStats operator +(GcStats left, GcStats right)

Parameters

left GcStats
right GcStats

Returns

GcStats

operator -(GcStats, GcStats)

public static GcStats operator -(GcStats left, GcStats right)

Parameters

left GcStats
right GcStats

Returns

GcStats