public static MachineMetrics Create(MachineMetricsCategory category = MachineMetricsCategory.All) { var metrics = new MachineMetrics(); if (category.HasFlag(MachineMetricsCategory.PhysicalDisk)) { metrics.InstallPhysicalDisk(); } if (category.HasFlag(MachineMetricsCategory.LogicalDisk)) { metrics.InstallLogicalDisk(); } if (category.HasFlag(MachineMetricsCategory.LocksAndThreads)) { metrics.InstallClrLocksAndThreads(); } if (category.HasFlag(MachineMetricsCategory.Memory)) { metrics.InstallClrMemory(); } return(metrics); }
public static MachineMetrics Create(MachineMetricsCategory category = MachineMetricsCategory.All) { var metrics = new MachineMetrics(); if (category.HasFlag(MachineMetricsCategory.PhysicalDisk)) metrics.InstallPhysicalDisk(); if (category.HasFlag(MachineMetricsCategory.LogicalDisk)) metrics.InstallLogicalDisk(); if (category.HasFlag(MachineMetricsCategory.LocksAndThreads)) metrics.InstallClrLocksAndThreads(); if (category.HasFlag(MachineMetricsCategory.Memory)) metrics.InstallClrMemory(); return metrics; }