/// <summary> /// Extract <see cref="Cpu"/> data from nodeMetrics, if the nodeMetrics /// contains necessary CPU metrics, otherwise it returns <see cref="Option{T}.None"/>. /// </summary> public static Option<Cpu> ExtractCpu(NodeMetrics nodeMetrics) { return Cpu.Decompose(nodeMetrics).Select(data => { return new Cpu(data.Address, data.Timestamp, data.CpuProcessUsage, data.CpuTotalUsage, data.Processors); }); }