惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
博客园_首页
宝玉的分享
宝玉的分享
S
SegmentFault 最新的问题
Jina AI
Jina AI
Hugging Face - Blog
Hugging Face - Blog
V
Visual Studio Blog
美团技术团队
IT之家
IT之家
罗磊的独立博客
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
月光博客
月光博客
Microsoft Azure Blog
Microsoft Azure Blog
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Last Week in AI
Last Week in AI
博客园 - 叶小钗
M
MIT News - Artificial intelligence
B
Blog RSS Feed
有赞技术团队
有赞技术团队
Y
Y Combinator Blog

Duende Software Official Site

WhatsApp One-Time Password (OTP) Login with Duende IdentityServer and User Management Planning a Successful Migration from IdentityServer3 to Duende IdentityServer Client Secrets, Mutual TLS and Private Key JWT, Oh My! How To Spell "Duende" Understanding .NET 11 Automatic CSRF Protection: A Guide for Identity Developers Security Lingo Explained: TOTP (Time-based One-Time Password) Custom Passkey Attestation Policies: Restricting Login to Hardware Keys OAuth Identity Chaining, Transaction Tokens, and Human-in-the-Loop: Summer 2026 Identity Standards Recap What is Identity? - The Question Every Team Should Answer Before Writing Code Security Is a Spectrum: How to Choose Session Lifetimes in Duende IdentityServer Passkeys and WebAuthn with Duende IdentityServer and User Management Authenticating Players in Godot 4 with OAuth 2.0 and OpenID Connect Hardening OAuth in the newest 2026-07-28 MCP Release Candidate Unify Your SAML and OIDC Signing Keys with Automatic Rotation and Duende IdentityServer Duende Software Duende Software Duende Software Duende Software Duende Software Duende Software Duende Software Duende Software Stop AI Bots from Wasting Your Server How Duende IdentityServer Filters Claims (And Why It Matters) Core vs Extended Protocols in Duende IdentityServer v8: What You Get and When You Need More Your IdentityServer v8 Upgrade Checklist: A Quick Pre-Flight Guide Setting Up SAML Single Sign-On in ASP.NET with Duende IdentityServer Your Identity, Your Terms: Duende's Modular Identity Infrastructure and v8.x Release Duende Spring Launch '26: Identity Infrastructure That Expands With You SAML and OpenID Connect (OIDC): Coexistence, Not Competition
BenchmarkDotNet - Open Source Sponsorship
Khalid Abuhakmeh · 2026-01-27 · via Duende Software Official Site

The software development space has creatively coined some memorable statements over the years, from “speed is a feature”, “memory is cheap”, and “always blame the new guy”. All these statements have one thing in common: as developers, we should do our best to baseline our assumptions and verify the truth. In the spirit of building the best software we possibly can by focusing on the fine details, we are happy to announce that this quarter's Duende Open Source Sponsorship goes to BenchmarkDotNet.

In our fourth sponsorship, the team at Duende has chosen BenchmarkDotNet as the next open-source recipient of our ongoing commitment to supporting projects that empower individuals, teams, communities, and organizations.

Now let’s see what BenchmarkDotNet is all about.

What is BenchmarkDotNet?

BenchmarkDotNet is the premier benchmarking library for .NET, helping you transform methods into benchmarks, track their performance, and share reproducible measurement results. While benchmarking may seem challenging, BenchmarkDotNet provides an API that wraps the most difficult aspects of the process and exposes developers to a familiar unit-testing paradigm. 27400+ GitHub projects have adopted BenchmarkDotNet, including .NET Runtime, .NET Compiler, .NET Performance, and many others. The project's grounding philosophy rests on the pillars of simplicity, automation, reliability, and friendliness.

Getting Started

To get started with BenchmarkDotNet, you’ll need to create a new console application within your solution. After making the new project, you’ll want to add the NuGet package.

dotnet add package BenchmarkDotNet

In the console application, we’ll be measuring the differences between .NET hashing algorithms. Paste the following code into the project.

Csharp

using System;
using System.Security.Cryptography;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;

namespace MyBenchmarks
{
    public class Md5VsSha256
    {
        private const int N = 10000;
        private readonly byte[] data;

        private readonly SHA256 sha256 = SHA256.Create();
        private readonly MD5 md5 = MD5.Create();

        public Md5VsSha256()
        {
            data = new byte[N];
            new Random(42).NextBytes(data);
        }

        [Benchmark]
        public byte[] Sha256() => sha256.ComputeHash(data);

        [Benchmark]
        public byte[] Md5() => md5.ComputeHash(data);
    }

    public class Program
    {
        public static void Main(string[] args)
        {
            var summary = BenchmarkRunner.Run<Md5VsSha256>();
        }
    }
}

The Program class is the console application’s entry point and invokes the BenchmarkRunner.Run<Md5VsSha256>() method to generate our benchmark results. Running the console application displays the results in the console.

Bash

BenchmarkDotNet=v0.13.2, OS=Windows 10 (10.0.19045.2251)
Intel Core i7-4770HQ CPU 2.20GHz (Haswell), 1 CPU, 8 logical and 4 physical cores
.NET SDK=7.0.100
  [Host]     : .NET 7.0.0 (7.0.22.51805), X64 RyuJIT AVX2
  DefaultJob : .NET 7.0.0 (7.0.22.51805), X64 RyuJIT AVX2


| Method |     Mean |    Error |   StdDev |
|------- |---------:|---------:|---------:|
| Sha256 | 51.57 us | 0.311 us | 0.291 us |
|    Md5 | 21.91 us | 0.138 us | 0.129 us |

While the current output shows only execution deviations between the two hashing algorithms, you can introduce additional facilities to examine other attributes of the code. Some include metrics around garbage collection, code size, threading, and many more. Additionally, you can export a report to multiple output formats, including CSVs, JSON, and HTML.

Here’s an example of the R plot output comparing several important metrics produced by the benchmark.

BenchmarkDotNet in action

If you want to know more about BenchmarkDotNet features, check out the Overview page.

BenchmarkDotNet at Duende

At Duende, we utilize BenchmarkDotNet to profile the performance of our Backend-For-Frontend (BFF) product in multiple scenarios. BenchmarkDotNet has been invaluable in helping us verify the different product modalities that customers can configure. The library also helps us track any regressions as we maintain and extend the product.

Here’s an example of our use case, verifying the performance of a single frontend and request throughput while using BFF.

Csharp

// Copyright (c) Duende Software. All rights reserved.
// See LICENSE in the project root for license information.

using BenchmarkDotNet.Attributes;

namespace Bff.Benchmarks;

public class SingleFrontendBenchmarks : BenchmarkBase
{
    private SingleFrontendFixture _fixture = null!;

    private HttpClient _authenticatedBffClient = null!;
    private HttpClient _anonBffClient = null!;
    private HttpClient _bffServerSideSessionsClient = null!;


    [GlobalSetup]
    public override async Task InitializeAsync()
    {
        _fixture = new SingleFrontendFixture();

        _authenticatedBffClient = _fixture.Internet.BuildHttpClient(_fixture.Bff.Url());
        await _authenticatedBffClient.GetAsync("/bff/login")
            .EnsureStatusCode();

        _anonBffClient = _fixture.Internet.BuildHttpClient(_fixture.Bff.Url());

        _bffServerSideSessionsClient = _fixture.Internet.BuildHttpClient(_fixture.Bff.Url());

        await _bffServerSideSessionsClient.GetAsync("/bff/login")
            .EnsureStatusCode();

    }

    [Benchmark]
    public async Task SingleFrontend_UserToken() => await _authenticatedBffClient
            .GetWithCSRF("/user_token")
            .EnsureStatusCode();

    [Benchmark]
    public async Task SingleFrontend_ClientCredentialsToken() => await _authenticatedBffClient
            .GetWithCSRF("/client_token")
            .EnsureStatusCode();

    [Benchmark]
    public async Task SingleFrontend_AnonLocalEndpoint() => await _anonBffClient
        .GetAsync("/anon")
        .EnsureStatusCode();

    [Benchmark]
    public async Task SingleFrontend_LocalEndpoint() => await _authenticatedBffClient
        .GetAsync("/anon")
        .EnsureStatusCode();

    [Benchmark]
    public async Task SingleFrontend_Login()
    {
        var client = _fixture.Internet.BuildHttpClient(_fixture.Bff.Url());
        await client.GetAsync("/bff/login")
            .EnsureStatusCode();
    }

    [GlobalCleanup]
    public override async Task DisposeAsync() => await _fixture.DisposeAsync();
}

It really is fantastic.

Sponsorship Details

To support the BenchmarkDotNet team and their outstanding work, Duende Software is sponsoring BenchmarkDotNet for the next 12 months at $250 per month (totaling $3000 for the year). This sponsorship will help the maintainers cover expenses and invest in the project’s growth and promotion.

If you benefit from BenchmarkDotNet, consider supporting the project as well. You can contribute in various ways, including financial contributions, code, documentation, or bug reports.