private HostEnvironmentInfo() { BenchmarkDotNetCaption = GetBenchmarkDotNetCaption(); BenchmarkDotNetVersion = GetBenchmarkDotNetVersion(); OsVersion = RuntimeInformation.GetOsVersion(); ProcessorName = new Lazy <string>(RuntimeInformation.GetProcessorName); ProcessorCount = Environment.ProcessorCount; ChronometerFrequency = Chronometer.Frequency; HardwareTimerKind = Chronometer.HardwareTimerKind; JitModules = RuntimeInformation.GetJitModules(); DotNetCliVersion = new Lazy <string>(DotNetCliCommandExecutor.GetDotNetCliVersion); }
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); }