Table of Contents

Class ObjectPoolDiagnostics

Namespace
CodeProject.ObjectPool.Core
Assembly
CodeProject.ObjectPool.dll

A simple class to track stats during execution. By default, this class does not record anything, since its Enabled property is set to false.

public class ObjectPoolDiagnostics
Inheritance
ObjectPoolDiagnostics
Inherited Members

Constructors

ObjectPoolDiagnostics()

Creates a new diagnostics object, ready to record Object Pool main events.

public ObjectPoolDiagnostics()

Properties

Enabled

Gets or sets whether this object can record data about how the Pool operates.

public bool Enabled { get; set; }

Property Value

bool

ObjectResetFailedCount

Gets the count of object reset failures occurred while the pool tried to re-add the object into the pool.

public long ObjectResetFailedCount { get; }

Property Value

long

PoolObjectHitCount

Gets the total count of successful accesses. The pool had a spare object to provide to the user without creating it on demand.

public long PoolObjectHitCount { get; }

Property Value

long

PoolObjectMissCount

Gets the total count of unsuccessful accesses. The pool had to create an object in order to satisfy the user request.

public long PoolObjectMissCount { get; }

Property Value

long

PoolOverflowCount

Gets the number of objects been destroyed because the pool was full at the time of returning the object to the pool.

public long PoolOverflowCount { get; }

Property Value

long

ReturnedToPoolByResurrectionCount

Gets the total count of object that has been picked up by the GC, and returned to pool.

public long ReturnedToPoolByResurrectionCount { get; }

Property Value

long

ReturnedToPoolCount

Gets the total count of objects that been successfully returned to the pool.

public long ReturnedToPoolCount { get; }

Property Value

long

TotalInstancesCreated

Gets the total number of pooled objected created.

public long TotalInstancesCreated { get; }

Property Value

long

TotalInstancesDestroyed

Gets the total number of objects destroyed, both in case of an pool overflow, and state corruption.

public long TotalInstancesDestroyed { get; }

Property Value

long

TotalLiveInstancesCount

Gets the total count of live instances, both in the pool and in use.

public long TotalLiveInstancesCount { get; }

Property Value

long

Methods

IncrementObjectResurrectionCount()

Increments the count of objects returned to pool by resurrection.

protected virtual void IncrementObjectResurrectionCount()

IncrementObjectsCreatedCount()

Increments the objects created count.

protected virtual void IncrementObjectsCreatedCount()

IncrementObjectsDestroyedCount()

Increments the objects destroyed count.

protected virtual void IncrementObjectsDestroyedCount()

IncrementPoolObjectHitCount()

Increments the pool object hit count.

protected virtual void IncrementPoolObjectHitCount()

IncrementPoolObjectMissCount()

Increments the pool object miss count.

protected virtual void IncrementPoolObjectMissCount()

IncrementPoolOverflowCount()

Increments the pool overflow count.

protected virtual void IncrementPoolOverflowCount()

IncrementResetStateFailedCount()

Increments the reset state failed count.

protected virtual void IncrementResetStateFailedCount()

IncrementReturnedToPoolCount()

Increments the returned to pool count.

protected virtual void IncrementReturnedToPoolCount()