protected BenchmarkEnvironmentInfo()
 {
     Architecture   = RuntimeInformation.GetArchitecture();
     ClrVersion     = RuntimeInformation.GetClrVersion();
     Configuration  = RuntimeInformation.GetConfiguration();
     HasRyuJit      = RuntimeInformation.HasRyuJit();
     IsServerGC     = GCSettings.IsServerGC;
     IsConcurrentGC = GCSettings.LatencyMode != GCLatencyMode.Batch;
 }
 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
 };
Exemple #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);
 }
 private static string GetClrVersion() => RuntimeInformation.GetClrVersion();