Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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;
        }