-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathMemoryStatsItem.cs
More file actions
37 lines (31 loc) · 1.32 KB
/
MemoryStatsItem.cs
File metadata and controls
37 lines (31 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
namespace PerformanceMonitorDashboard.Models
{
public class MemoryStatsItem
{
public long CollectionId { get; set; }
public DateTime CollectionTime { get; set; }
// Memory clerks summary
public decimal BufferPoolMb { get; set; }
public decimal PlanCacheMb { get; set; }
public decimal OtherMemoryMb { get; set; }
public decimal TotalMemoryMb { get; set; }
// Process memory
public decimal PhysicalMemoryInUseMb { get; set; }
public decimal AvailablePhysicalMemoryMb { get; set; }
public int MemoryUtilizationPercentage { get; set; }
// Server and target memory
public decimal? TotalPhysicalMemoryMb { get; set; }
public decimal? CommittedTargetMemoryMb { get; set; }
// Pressure warnings
public bool BufferPoolPressureWarning { get; set; }
public bool PlanCachePressureWarning { get; set; }
// Computed percentages (calculated in C#, matching SQL computed columns)
public decimal? BufferPoolPercentage => TotalMemoryMb > 0
? BufferPoolMb * 100.0m / TotalMemoryMb
: null;
public decimal? PlanCachePercentage => TotalMemoryMb > 0
? PlanCacheMb * 100.0m / TotalMemoryMb
: null;
}
}