public static EnvironmentHelper GetCurrentInfo() => new EnvironmentHelper { BenchmarkDotNetCaption = GetBenchmarkDotNetCaption(), BenchmarkDotNetVersion = GetBenchmarkDotNetVersion(), OsVersion = RuntimeInformation.GetOsVersion(), ProcessorName = RuntimeInformation.GetProcessorName(), ProcessorCount = Environment.ProcessorCount, ClrVersion = RuntimeInformation.GetClrVersion(), Architecture = GetArchitecture(), HasAttachedDebugger = Debugger.IsAttached, HasRyuJit = GetHasRyuJit(), Configuration = GetConfiguration(), ChronometerFrequency = Chronometer.Frequency, JitModules = RuntimeInformation.GetJitModules(), HardwareTimerKind = Chronometer.HardwareTimerKind };
private EnvironmentInfo() { BenchmarkDotNetCaption = GetBenchmarkDotNetCaption(); BenchmarkDotNetVersion = GetBenchmarkDotNetVersion(); OsVersion = RuntimeInformation.GetOsVersion(); ProcessorName = RuntimeInformation.GetProcessorName(); ProcessorCount = Environment.ProcessorCount; ClrVersion = RuntimeInformation.GetClrVersion(); Architecture = GetArchitecture(); HasAttachedDebugger = Debugger.IsAttached; HasRyuJit = RuntimeInformation.HasRyuJit(); Configuration = RuntimeInformation.GetConfiguration(); ChronometerFrequency = Chronometer.Frequency; JitModules = RuntimeInformation.GetJitModules(); HardwareTimerKind = Chronometer.HardwareTimerKind; DotNetCliVersion = new Lazy <string>(DotNetCliCommandExecutor.GetDotNetCliVersion); }
private static string GetProcessorName() => RuntimeInformation.GetProcessorName();