Skip to content

Commit

Permalink
Fix clearing cpu cores list
Browse files Browse the repository at this point in the history
  • Loading branch information
L3tum committed Oct 19, 2019
1 parent eddc7ae commit 5d4705b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion HardwareInformation/MachineInformationGatherer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private static void GetCommonCpuInformation()
information.Cpu.LogicalCoresPerNode = information.Cpu.LogicalCores;
information.Cpu.Nodes = 1;
information.Cpu.Architecture = RuntimeInformation.ProcessArchitecture.ToString();
information.Cpu.Caption = Environment.GetEnvironmentVariable("PROCESSOR_IDENTIFIER");
information.Cpu.Caption = Environment.GetEnvironmentVariable("PROCESSOR_IDENTIFIER") ?? default;
information.Cpu.Name = information.Cpu.Caption;

for (var i = 0; i < information.Cpu.LogicalCores; i++)
Expand Down
3 changes: 1 addition & 2 deletions HardwareInformation/Providers/AMDInformationProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,7 @@ private void GatherPhysicalCores(ref MachineInformation information)
information.Cpu.Nodes = (uint) nodeIds.Count;
information.Cpu.LogicalCoresPerNode = nodeIds.First().Value;

information.Cpu.Cores.Clear();
information.Cpu.Cores.AddRange(cores);
information.Cpu.Cores = cores;
}
}
}

0 comments on commit 5d4705b

Please sign in to comment.