Skip to content

CounterSnapshot

Namespace: Dotsider.Core.Analysis.Models

Assembly: Dotsider.Core.dll

A snapshot of runtime performance counters at a point in time.

public sealed record CounterSnapshot : IEquatable<CounterSnapshot>

ObjectCounterSnapshot

CounterSnapshot(TimeSpan, double, double, double, long, long, long, int, long, long, long)

Section titled “CounterSnapshot(TimeSpan, double, double, double, long, long, long, int, long, long, long)”

A snapshot of runtime performance counters at a point in time.

Parameters:

  • Timestamp (TimeSpan): Elapsed time since the trace started.
  • CpuUsagePercent (Double): CPU usage as a percentage (0–100).
  • WorkingSetMb (Double): Process working set in megabytes.
  • GcHeapSizeMb (Double): GC heap size in megabytes.
  • Gen0Collections (Int64): Cumulative generation 0 collection count.
  • Gen1Collections (Int64): Cumulative generation 1 collection count.
  • Gen2Collections (Int64): Cumulative generation 2 collection count.
  • ThreadPoolThreadCount (Int32): Number of active thread pool threads.
  • ThreadPoolQueueLength (Int64): Number of work items queued to the thread pool.
  • ExceptionCount (Int64): Cumulative exception count.
  • ActiveTimerCount (Int64): Number of active timers.
public CounterSnapshot(TimeSpan Timestamp, double CpuUsagePercent, double WorkingSetMb, double GcHeapSizeMb, long Gen0Collections, long Gen1Collections, long Gen2Collections, int ThreadPoolThreadCount, long ThreadPoolQueueLength, long ExceptionCount, long ActiveTimerCount)

Number of active timers.

Returns: Int64

public long ActiveTimerCount { get; init; }

CPU usage as a percentage (0–100).

Returns: Double

public double CpuUsagePercent { get; init; }

Cumulative exception count.

Returns: Int64

public long ExceptionCount { get; init; }

GC heap size in megabytes.

Returns: Double

public double GcHeapSizeMb { get; init; }

Cumulative generation 0 collection count.

Returns: Int64

public long Gen0Collections { get; init; }

Cumulative generation 1 collection count.

Returns: Int64

public long Gen1Collections { get; init; }

Cumulative generation 2 collection count.

Returns: Int64

public long Gen2Collections { get; init; }

Number of work items queued to the thread pool.

Returns: Int64

public long ThreadPoolQueueLength { get; init; }

Number of active thread pool threads.

Returns: Int32

public int ThreadPoolThreadCount { get; init; }

Elapsed time since the trace started.

Returns: TimeSpan

public TimeSpan Timestamp { get; init; }

Process working set in megabytes.

Returns: Double

public double WorkingSetMb { get; init; }