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; }

Deconstruct(out TimeSpan, out double, out double, out double, out long, out long, out long, out int, out long, out long, out long)

Section titled “Deconstruct(out TimeSpan, out double, out double, out double, out long, out long, out long, out int, out long, out long, out long)”

Parameters:

public void Deconstruct(out TimeSpan Timestamp, out double CpuUsagePercent, out double WorkingSetMb, out double GcHeapSizeMb, out long Gen0Collections, out long Gen1Collections, out long Gen2Collections, out int ThreadPoolThreadCount, out long ThreadPoolQueueLength, out long ExceptionCount, out long ActiveTimerCount)

Parameters:

Returns: Boolean

public bool Equals(CounterSnapshot? other)

Parameters:

Returns: Boolean

public override bool Equals(object? obj)

Returns: Int32

public override int GetHashCode()

Returns: String

public override string ToString()

operator !=(CounterSnapshot?, CounterSnapshot?)

Section titled “operator !=(CounterSnapshot?, CounterSnapshot?)”

Parameters:

Returns: Boolean

public static bool operator !=(CounterSnapshot? left, CounterSnapshot? right)

operator ==(CounterSnapshot?, CounterSnapshot?)

Section titled “operator ==(CounterSnapshot?, CounterSnapshot?)”

Parameters:

Returns: Boolean

public static bool operator ==(CounterSnapshot? left, CounterSnapshot? right)