Table of Contents

Class HostEnvironmentInfo

Namespace
BenchmarkDotNet.Environments
Assembly
BenchmarkDotNet.dll
public class HostEnvironmentInfo : BenchmarkEnvironmentInfo
Inheritance
HostEnvironmentInfo
Inherited Members

Constructors

HostEnvironmentInfo()

protected HostEnvironmentInfo()

Fields

BenchmarkDotNetCaption

public const string BenchmarkDotNetCaption = "BenchmarkDotNet"

Field Value

string

Properties

AntivirusProducts

public Lazy<ICollection<Antivirus>> AntivirusProducts { get; }

Property Value

Lazy<ICollection<Antivirus>>

BenchmarkDotNetVersion

public string BenchmarkDotNetVersion { get; protected set; }

Property Value

string

ChronometerFrequency

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

public Frequency ChronometerFrequency { get; protected set; }

Property Value

Frequency

ChronometerResolution

public TimeInterval ChronometerResolution { get; }

Property Value

TimeInterval

CpuInfo

is expensive to call (1s)

public Lazy<CpuInfo> CpuInfo { get; protected set; }

Property Value

Lazy<CpuInfo>

DotNetSdkVersion

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

public Lazy<string> DotNetSdkVersion { get; protected set; }

Property Value

Lazy<string>

FallbackLogger

Logger to use when there's no config available.

public static ILogger FallbackLogger { get; }

Property Value

ILogger

HardwareTimerKind

public HardwareTimerKind HardwareTimerKind { get; protected set; }

Property Value

HardwareTimerKind

IsMonoInstalled

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

public Lazy<bool> IsMonoInstalled { get; }

Property Value

Lazy<bool>

OsVersion

Could be expensive

public Lazy<string> OsVersion { get; protected set; }

Property Value

Lazy<string>

VirtualMachineHypervisor

public Lazy<VirtualMachineHypervisor> VirtualMachineHypervisor { get; protected set; }

Property Value

Lazy<VirtualMachineHypervisor>

Methods

GetCurrent()

public static HostEnvironmentInfo GetCurrent()

Returns

HostEnvironmentInfo

GetInformation()

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

public static string GetInformation()

Returns

string

IsDotNetCliInstalled()

public bool IsDotNetCliInstalled()

Returns

bool

ToFormattedString()

public override IEnumerable<string> ToFormattedString()

Returns

IEnumerable<string>