Table of Contents

Class MemoryStatistics

Namespace
DotCompute.Runtime.Services.Statistics
Assembly
DotCompute.Runtime.dll

Memory usage and performance statistics.

public sealed class MemoryStatistics
Inheritance
MemoryStatistics
Inherited Members

Properties

AverageAllocationTime

Gets or sets the average allocation time.

public double AverageAllocationTime { get; }

Property Value

double

The average allocation time.

CurrentlyAllocatedBytes

Gets or sets the currently allocated bytes.

public long CurrentlyAllocatedBytes { get; }

Property Value

long

The currently allocated bytes.

PoolHitRate

Gets or sets the pool hit rate.

public double PoolHitRate { get; }

Property Value

double

The pool hit rate.

TotalAllocations

Gets or sets the total allocations.

public long TotalAllocations { get; }

Property Value

long

The total allocations.

TotalBytesAllocated

Gets or sets the total bytes allocated.

public long TotalBytesAllocated { get; }

Property Value

long

The total bytes allocated.

TotalDeallocations

Gets or sets the total deallocations.

public long TotalDeallocations { get; }

Property Value

long

The total deallocations.

Methods

CreateSnapshot()

Creates a new snapshot.

public MemoryStatistics CreateSnapshot()

Returns

MemoryStatistics

The created snapshot.

RecordAllocation(long, double, bool)

Performs record allocation.

public void RecordAllocation(long bytes, double timeMs, bool fromPool)

Parameters

bytes long

The bytes.

timeMs double

The time ms.

fromPool bool

The from pool.

RecordBufferCreation(long)

Performs record buffer creation.

public static void RecordBufferCreation(long bytes)

Parameters

bytes long

The bytes.

RecordBufferDestruction(long)

Performs record buffer destruction.

public void RecordBufferDestruction(long bytes)

Parameters

bytes long

The bytes.

RecordCopyOperation(long, double, bool)

Performs record copy operation.

public void RecordCopyOperation(long bytes, double timeMs, bool isHostToDevice)

Parameters

bytes long

The bytes.

timeMs double

The time ms.

isHostToDevice bool

A value indicating whether hostToDevice.

RecordFailedAllocation(long)

Performs record failed allocation.

public static void RecordFailedAllocation(long bytes)

Parameters

bytes long

The bytes.