コード例 #1
0
 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);
 }
コード例 #2
0
 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
 };
コード例 #3
0
 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);
 }
コード例 #4
0
 private static string GetOsVersion() => RuntimeInformation.GetOsVersion();