Snapshot Struct

Definition

Caution

This API is obsolete and will be removed in a future version. Consider using Resource Monitoring observable instruments.

A snapshot of CPU and memory usage taken periodically over time.

C#
[System.Diagnostics.CodeAnalysis.Experimental("EXTEXP0008", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")]
[System.Obsolete("This API is obsolete and will be removed in a future version. Consider using Resource Monitoring observable instruments.", DiagnosticId="EXTOBS0001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")]
public readonly struct Snapshot
Inheritance
Snapshot
Attributes

Constructors

Snapshot(TimeSpan, TimeSpan, TimeSpan, UInt64)

Initializes a new instance of the Snapshot struct.

Properties

KernelTimeSinceStart

Gets the amount of kernel time that has elapsed since startup.

MemoryUsageInBytes

Gets the memory usage within the system in bytes.

TotalTimeSinceStart

Gets the total CPU time that has elapsed since startup.

UserTimeSinceStart

Gets the amount of user time that has elapsed since startup.

Applies to

Product Versions (Obsolete)
.NET (8 (package-provided), 9 (package-provided))
.NET Framework (4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided))