Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Gemstone.Diagnostics/PerformanceMonitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
AddCounter("Process", "Handle Count", m_processName, "Process Handle Count", "Total Handles", 1);
#endif
AddCounter("Process", "Thread Count", m_processName, "Process Thread Count", "System Threads", 1);
AddCounter("Process", "Working Set", m_processName, "Process Memory Usage", "Megabytes", SI2.Mega);

// TODO: .NET Core does not emit Windows performance counters - use EventCounters for .NET Core instead

Expand Down Expand Up @@ -198,7 +199,7 @@
*/

// Add default networking counters
#if MONO
#if MONO
PerformanceCounterCategory category = new PerformanceCounterCategory("Network Interface");

foreach (string instance in category.GetInstanceNames())
Expand All @@ -209,7 +210,7 @@
AddCounter("Network Interface", "Bytes Sent/sec", instance, string.Format("IP Outgoing ({0})", instance).TruncateRight(20), "Bytes / sec", 1);
AddCounter("Network Interface", "Bytes Received/sec", instance, string.Format("IP Incoming ({0})", instance).TruncateRight(20), "Bytes / sec", 1);
}
#else
#else
if (PerformanceCounterCategory.Exists("IPv4"))
{
// 12345678901234567890
Expand Down Expand Up @@ -265,7 +266,7 @@
/// Gets the <see cref="PerformanceCounter"/> that monitors the processor utilization of the monitored process.
/// </summary>
/// <remarks>This <see cref="PerformanceCounter"/> is added by default.</remarks>
public PerformanceCounter CPUUsage => FindCounter("% Processor Time");

Check warning on line 269 in src/Gemstone.Diagnostics/PerformanceMonitor.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Possible null reference return.

/// <summary>
/// Gets the <see cref="PerformanceCounter"/> that monitors the IP based datagrams sent / second of the system.
Expand Down
Loading