INNER CODE UNIT · C#

Benchmark

BEagle1984/silverback · benchmarks/V462Benchmark/Benchmark.cs:14

public abstract class Benchmark
{
    protected IHost? Host { get; private set; }

    protected IPublisher Publisher { get => field ?? throw new InvalidOperationException("The publisher is not initialized yet."); private set; }

    [GlobalSetup]
    public virtual void Setup()
    {
        Host = Microsoft.Extensions.Hosting.Host.CreateDefaultBuilder()
            .ConfigureServices(
                services =>
                {
                    services.AddLogging(configure => configure.SetMinimumLevel(LogLevel.Error));
                    ConfigureServices(services);
                    ConfigureSilverback(services.AddSilverback());
                })
            .Build();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…