Table of Contents

Run Method

Definition

Namespace
Codebelt.Extensions.BenchmarkDotNet.Console
Assemblies
Codebelt.Extensions.BenchmarkDotNet.Console.dll
Source
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs

Run(string[], Action<BenchmarkWorkspaceOptions>)

Runs benchmarks using the default BenchmarkWorkspace implementation.

public static void Run(string[] args, Action<BenchmarkWorkspaceOptions> setup = null)

Parameters

args string[]

The command-line arguments passed to the application.

setup Action<BenchmarkWorkspaceOptions>

The BenchmarkWorkspaceOptions which may be configured.

Remarks

This method configures the host builder with the necessary services, builds the host, and runs it to execute benchmarks.

Run(string[], Action<IServiceCollection>, Action<BenchmarkWorkspaceOptions>)

Runs benchmarks using the default BenchmarkWorkspace implementation.

public static void Run(string[] args, Action<IServiceCollection> serviceConfigurator = null, Action<BenchmarkWorkspaceOptions> setup = null)

Parameters

args string[]

The command-line arguments passed to the application.

serviceConfigurator Action<IServiceCollection>

The delegate that will be invoked to configure additional services in the IServiceCollection.

setup Action<BenchmarkWorkspaceOptions>

The BenchmarkWorkspaceOptions which may be configured.

Remarks

This method configures the host builder with the necessary services, builds the host, and runs it to execute benchmarks.

Run<TWorkspace>(string[], Action<BenchmarkWorkspaceOptions>)

Runs benchmarks using a custom implementation of IBenchmarkWorkspace.

public static void Run<TWorkspace>(string[] args, Action<BenchmarkWorkspaceOptions> setup = null) where TWorkspace : class, IBenchmarkWorkspace

Parameters

args string[]

The command-line arguments passed to the application.

setup Action<BenchmarkWorkspaceOptions>

The BenchmarkWorkspaceOptions which may be configured.

Type Parameters

TWorkspace

The type of the workspace that implements IBenchmarkWorkspace.

Remarks

This method configures the host builder with the necessary services, builds the host, and runs it to execute benchmarks.

Run<TWorkspace>(string[], Action<IServiceCollection>, Action<BenchmarkWorkspaceOptions>)

Runs benchmarks using a custom implementation of IBenchmarkWorkspace.

public static void Run<TWorkspace>(string[] args, Action<IServiceCollection> serviceConfigurator = null, Action<BenchmarkWorkspaceOptions> setup = null) where TWorkspace : class, IBenchmarkWorkspace

Parameters

args string[]

The command-line arguments passed to the application.

serviceConfigurator Action<IServiceCollection>

The delegate that will be invoked to configure additional services in the IServiceCollection.

setup Action<BenchmarkWorkspaceOptions>

The BenchmarkWorkspaceOptions which may be configured.

Type Parameters

TWorkspace

The type of the workspace that implements IBenchmarkWorkspace.

Remarks

This method configures the host builder with the necessary services, builds the host, and runs it to execute benchmarks.