Class InProcessHost
- Namespace
- BenchmarkDotNet.Toolchains.InProcess
- Assembly
- BenchmarkDotNet.dll
Host API for in-process benchmarks.
public sealed class InProcessHost : IHost, IDisposable
- Inheritance
-
InProcessHost
- Implements
- Extension Methods
Constructors
InProcessHost(BenchmarkCase, ILogger, IDiagnoser)
Creates a new instance of InProcessHost.
public InProcessHost(BenchmarkCase benchmarkCase, ILogger logger, IDiagnoser diagnoser)
Parameters
benchmarkCase
BenchmarkCaseCurrent benchmark.
logger
ILoggerLogger for informational output.
diagnoser
IDiagnoserDiagnosers, if attached.
Properties
Config
Current config
public IConfig Config { get; set; }
Property Value
- IConfig
- Host API for in-process benchmarks.
IsDiagnoserAttached
True
if there are diagnosers attached.
public bool IsDiagnoserAttached { get; }
Property Value
- bool
True
if there are diagnosers attached.
RunResults
Results of the run.
public RunResults RunResults { get; }
Property Value
- RunResults
Results of the run.
Methods
Dispose()
public void Dispose()
ReportResults(RunResults)
Submits run results to the host.
public void ReportResults(RunResults runResults)
Parameters
runResults
RunResultsThe run results.
SendError(string)
public void SendError(string message)
Parameters
message
string- Host API for in-process benchmarks.
SendSignal(HostSignal)
Sends notification signal to the host.
public void SendSignal(HostSignal hostSignal)
Parameters
hostSignal
HostSignalThe signal to send.
Write(string)
Passes text to the host.
public void Write(string message)
Parameters
message
stringText to write.
WriteLine()
Passes new line to the host.
public void WriteLine()
WriteLine(string)
Passes text (new line appended) to the host.
public void WriteLine(string message)
Parameters
message
stringText to write.