Show / Hide Table of Contents

Class HostEnvironmentInfo

Inheritance
Object
BenchmarkEnvironmentInfo
HostEnvironmentInfo
Inherited Members
BenchmarkEnvironmentInfo.Architecture
BenchmarkEnvironmentInfo.Configuration
BenchmarkEnvironmentInfo.RuntimeVersion
BenchmarkEnvironmentInfo.HasAttachedDebugger
BenchmarkEnvironmentInfo.HasRyuJit
BenchmarkEnvironmentInfo.JitInfo
BenchmarkEnvironmentInfo.IsServerGC
BenchmarkEnvironmentInfo.IsConcurrentGC
BenchmarkEnvironmentInfo.GCAllocationQuantum
BenchmarkEnvironmentInfo.InDocker
BenchmarkEnvironmentInfo.GetConfigurationFlag()
BenchmarkEnvironmentInfo.GetDebuggerFlag()
BenchmarkEnvironmentInfo.GetGcServerFlag()
BenchmarkEnvironmentInfo.GetGcConcurrentFlag()
BenchmarkEnvironmentInfo.Validate(Job)
Namespace: BenchmarkDotNet.Environments
Assembly: BenchmarkDotNet.dll
Syntax
public class HostEnvironmentInfo : BenchmarkEnvironmentInfo

Constructors

HostEnvironmentInfo()

Declaration
protected HostEnvironmentInfo()

Fields

BenchmarkDotNetCaption

Declaration
public const string BenchmarkDotNetCaption = "BenchmarkDotNet"
Field Value
Type Description
String

Properties

AntivirusProducts

Declaration
public Lazy<ICollection<Antivirus>> AntivirusProducts { get; }
Property Value
Type Description
Lazy<ICollection<Antivirus>>

BenchmarkDotNetVersion

Declaration
public string BenchmarkDotNetVersion { get; protected set; }
Property Value
Type Description
String

ChronometerFrequency

The frequency of the timer as the number of ticks per second.

Declaration
public Frequency ChronometerFrequency { get; protected set; }
Property Value
Type Description
Frequency

ChronometerResolution

Declaration
public TimeInterval ChronometerResolution { get; }
Property Value
Type Description
TimeInterval

CpuInfo

is expensive to call (1s)

Declaration
public Lazy<CpuInfo> CpuInfo { get; protected set; }
Property Value
Type Description
Lazy<CpuInfo>

DotNetSdkVersion

.NET Core SDK version It's expensive to call (creates new process by calling dotnet --version)

Declaration
public Lazy<string> DotNetSdkVersion { get; protected set; }
Property Value
Type Description
Lazy<String>

FallbackLogger

Logger to use when there's no config available.

Declaration
public static ILogger FallbackLogger { get; }
Property Value
Type Description
ILogger

HardwareTimerKind

Declaration
public HardwareTimerKind HardwareTimerKind { get; protected set; }
Property Value
Type Description
HardwareTimerKind

IsMonoInstalled

checks if Mono is installed It's expensive to call (creates new process by calling mono --version)

Declaration
public Lazy<bool> IsMonoInstalled { get; }
Property Value
Type Description
Lazy<Boolean>

OsVersion

Could be expensive

Declaration
public Lazy<string> OsVersion { get; protected set; }
Property Value
Type Description
Lazy<String>

VirtualMachineHypervisor

Declaration
public Lazy<VirtualMachineHypervisor> VirtualMachineHypervisor { get; protected set; }
Property Value
Type Description
Lazy<VirtualMachineHypervisor>

Methods

GetCurrent()

Declaration
public static HostEnvironmentInfo GetCurrent()
Returns
Type Description
HostEnvironmentInfo

GetInformation()

Return string representation of CPU and environment configuration including BenchmarkDotNet, OS and .NET version

Declaration
public static string GetInformation()
Returns
Type Description
String

IsDotNetCliInstalled()

Declaration
public bool IsDotNetCliInstalled()
Returns
Type Description
Boolean

ToFormattedString()

Declaration
public override IEnumerable<string> ToFormattedString()
Returns
Type Description
IEnumerable<String>
Overrides
BenchmarkEnvironmentInfo.ToFormattedString()
In This Article
Back to top Copyright © 2013–2021 .NET Foundation and contributors