Browse Source

Control.Describe to include CPU architecture and identifier if known

dependabot/nuget/NUnit3TestAdapter-4.2.0
Christoph Ruegg 5 years ago
parent
commit
ec9e4abf9c
  1. 21
      src/Numerics/Control.cs

21
src/Numerics/Control.cs

@ -28,15 +28,21 @@
// </copyright>
using System;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using MathNet.Numerics.Providers.SparseSolver;
using MathNet.Numerics.Providers.FourierTransform;
using MathNet.Numerics.Providers.LinearAlgebra;
#if NET40
using System.Linq;
#endif
#if !NET40 && !NET461
using System.Runtime.InteropServices;
#endif
namespace MathNet.Numerics
{
/// <summary>
@ -346,6 +352,17 @@ namespace MathNet.Numerics
sb.AppendLine($"Framework: {RuntimeInformation.FrameworkDescription}");
sb.AppendLine($"Process Architecture: {RuntimeInformation.ProcessArchitecture}");
#endif
var processorArchitecture = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE");
if (!String.IsNullOrEmpty(processorArchitecture))
{
sb.AppendLine($"Processor Architecture: {processorArchitecture}");
}
var processorId = Environment.GetEnvironmentVariable("PROCESSOR_IDENTIFIER");
if (!String.IsNullOrEmpty(processorId))
{
sb.AppendLine($"Processor Identifier: {processorId}");
}
return sb.ToString();
}
}

Loading…
Cancel
Save