Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
948e28b
:fire: remove repo template files
gimlichael Dec 8, 2025
856dbca
:sparkles: add extensibility layer for benchmarkdotnet
gimlichael Dec 8, 2025
69ad4fe
:test_tube: add comprehensive tests for BenchmarkWorkspaceOptions
gimlichael Dec 8, 2025
e7ec032
:rocket: add dedicated benchmarking suite and runner projects
gimlichael Dec 9, 2025
6aeb59e
:chart_with_upwards_trend: add benchmarkdotnet github reports for wor…
gimlichael Dec 9, 2025
a65dcce
:lock: refactor assembly resolution for thread safety and speed
gimlichael Dec 9, 2025
ed120db
:memo: update ai docs for this repository
gimlichael Dec 9, 2025
54e3de1
:rocket: add console integration for project
gimlichael Dec 9, 2025
bda283c
:heavy_plus_sign: add solution file for project organization
gimlichael Dec 9, 2025
5d35470
:recycle: update branding, frameworks, and benchmark build settings
gimlichael Dec 9, 2025
a1cf015
:wastebasket: remove release notes file prop, add clean for benchmark…
gimlichael Dec 9, 2025
a3a0628
:arrow_up: bump dependencies
gimlichael Dec 9, 2025
42167d2
:sparkles: add benchmark suite for core classes and operations
gimlichael Dec 11, 2025
e37b15d
:recycle: migrate to .slnx format
gimlichael Dec 11, 2025
7eaaa7f
:arrow_up: bump dependencies
gimlichael Dec 11, 2025
f8815ad
:memo: update benchmark naming and placement guidelines
gimlichael Dec 11, 2025
3d430f7
:construction_worker: update ci pipeline for BenchmarkDotNet
gimlichael Dec 11, 2025
bccb3d4
:fire: remove template release notes, readme, and icon from project
gimlichael Dec 11, 2025
f9940f5
:bookmark: update changelog for initial stable release of packages
gimlichael Dec 11, 2025
18608ce
:bookmark: add package release notes for BenchmarkDotNet extensions
gimlichael Dec 11, 2025
d9b5d20
✨ update type parameter in AddBenchmarkWorkspace method for clarity
gimlichael Dec 11, 2025
c524199
:art: add new icon.png image to project
gimlichael Dec 11, 2025
469effd
✨ update docfx to match benchmarkdotnet
gimlichael Dec 11, 2025
9e9288a
:package: updated NuGet package definition
gimlichael Dec 11, 2025
e69f60c
:art: add property group with description and tags to csproj files
gimlichael Dec 11, 2025
4254e60
:art: update exception documentation for ConfigureBenchmarkDotNet method
gimlichael Dec 11, 2025
9300d7d
:art: update readme to reflect benchmarkdotnet extensions
gimlichael Dec 11, 2025
91a2c47
:chart_with_upwards_trend: add benchmark reports
gimlichael Dec 11, 2025
f889f3f
:art: update readme with folder structure and usage examples
gimlichael Dec 11, 2025
4788207
:art: fix os matrix formatting in ci pipeline configuration
gimlichael Dec 11, 2025
0af72cd
:pencil2: fix typo in benchmarkdotnet project/repo names in ci-pipeline
gimlichael Dec 12, 2025
d89b6b1
:adhesive_bandage: handle null GetEntryAssembly in BenchmarkProgram ctor
gimlichael Dec 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .docfx/BuildDocfxImage.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$version = minver -i -t v -v w
docfx metadata docfx.json
docker buildx build -t yourbranding/classlibrary1:$version --platform linux/arm64,linux/amd64 --load -f Dockerfile.docfx .
docker buildx build -t benchmarkdotnet-docfx:$version --platform linux/arm64,linux/amd64 --load -f Dockerfile.docfx .
get-childItem -recurse -path api -include *.yml, .manifest | remove-item
4 changes: 2 additions & 2 deletions .docfx/PublishDocfxImage.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
$version = minver -i -t v -v w
docker tag classlibrary1-docfx:$version yourbranding/classlibrary1:$version
docker push yourbranding/classlibrary1:$version
docker tag benchmarkdotnet-docfx:$version jcr.codebelt.net/geekle/benchmarkdotnet-docfx:$version
docker push jcr.codebelt.net/geekle/benchmarkdotnet-docfx:$version
15 changes: 0 additions & 15 deletions .docfx/api/namespaces/ClassLibrary1.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
uid: Codebelt.Extensions.BenchmarkDotNet.Console
summary: *content
---
The `Codebelt.Extensions.BenchmarkDotNet.Console` namespace contains types that provide a structured and opinionated console-hosted execution model for `BenchmarkDotNet`.

[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
14 changes: 14 additions & 0 deletions .docfx/api/namespaces/Codebelt.Extensions.BenchmarkDotNet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
uid: Codebelt.Extensions.BenchmarkDotNet
summary: *content
---
The `Codebelt.Extensions.BenchmarkDotNet` namespace contains types that provide a uniform, opinionated, and extensible way of working with `BenchmarkDotNet`.

[!INCLUDE [availability-modern](../../includes/availability-modern.md)]

### Extension Methods

|Type|Ext|Methods|
|--:|:-:|---|
|BenchmarkWorkspaceOptions|⬇️|`ConfigureBenchmarkDotNet`|
|IServiceCollection|⬇️|`AddBenchmarkWorkspace`, `AddBenchmarkWorkspace<TWorkspace>`|
16 changes: 8 additions & 8 deletions .docfx/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
"src": [
{
"files": [
"ClassLibrary1/**.csproj"
"Codebelt.Extensions.BenchmarkDotNet/**.csproj",
"Codebelt.Extensions.BenchmarkDotNet.Console/**.csproj"
],
"src": "../src"
}
],
"dest": "api",
"filter": "filterConfig.yml",
"properties": {
"TargetFramework": "net8.0"
"TargetFramework": "net10.0"
}
}
],
"build": {
"xref": [
"https://docs.cuemon.net/xrefmap.yml",
"https://docs.savvyio.net/xrefmap.yml",
"https://sharedkernel.codebelt.net/xrefmap.yml",
"https://bootstrapper.codebelt.net/xrefmap.yml",
"https://github.com/dotnet/docfx/raw/main/.xrefmap.json"
],
"content": [
Expand All @@ -46,15 +46,15 @@
}
],
"globalMetadata": {
"_appTitle": "Shared Kernel (DDD) for .NET",
"_appFooter": "<span>Generated by <strong>DocFX</strong>. Copyright 2024 ClassLibrary1. All rights reserved.</span>",
"_appTitle": "Extensions for BenchmarkDotNet by Codebelt",
"_appFooter": "<span>Generated by <strong>DocFX</strong>. Copyright 2025 Geekle. All rights reserved.</span>",
"_appLogoPath": "images/50x50.png",
"_appFaviconPath": "images/favicon.ico",
"_googleAnalyticsTagId": "G-X000000000",
"_googleAnalyticsTagId": "G-K2NG2TXDWQ",
"_enableSearch": false,
"_disableContribution": false,
"_gitContribute": {
"repo": "https://github.com/classlibrary1/ClassLibrary1",
"repo": "https://github.com/codebeltnet/benchmarkdotnet",
"branch": "main"
},
"_gitUrlPattern": "github"
Expand Down
Binary file modified .docfx/images/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .docfx/images/50x50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .docfx/images/favicon.ico
Binary file not shown.
1 change: 0 additions & 1 deletion .docfx/includes/availability-default.md

This file was deleted.

2 changes: 1 addition & 1 deletion .docfx/includes/availability-modern.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Availability: .NET 8 and .NET 6
Availability: .NET 10 and .NET 9.0
10 changes: 7 additions & 3 deletions .docfx/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
---
uid: frontpage-md
title: ClassLibrary1
title: Extensions for BenchmarkDotNet by Codebelt
---
# ClassLibrary1
![Extensions for BenchmarkDotNet API by Codebelt](/images/128x128.png)

Landing page for ClassLibrary1.
# Extensions for BenchmarkDotNet by Codebelt

This project is part of [Extensions for BenchmarkDotNet by Codebelt](https://github.com/codebeltnet/benchmarkdotnet).

Proceed to the [docs](/api/Codebelt.Extensions.BenchmarkDotNet.html) to learn more about the capabilities of this project.
15 changes: 4 additions & 11 deletions .docfx/packages/index.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
# NuGet Packages

This is a list of all NuGet packages from **ClassLibrary1** that is publicly available on [NuGet.org](https://www.nuget.org/packages?q=ClassLibrary1); the packages here are listed alphabetically and are available in preview-, rc- and production-ready versions.
This is a list of all NuGet packages from **Extensions for BenchmarkDotNet by Codebelt** that is publicly available on [NuGet.org](https://www.nuget.org/packages?q=codebelt.extensions.benchmarkdotnet); the packages here are listed alphabetically and are available in preview-, rc- and production-ready versions.

## 📦 Standalone Packages

Provides a focused API for ...
Provides a focused API for BenchmarkDotNet projects.

|Package|vNext|Stable|Downloads|
|:--|:-:|:-:|:-:|
| [ClassLibrary1](https://www.nuget.org/packages/ClassLibrary1/) | ![vNext](https://img.shields.io/nuget/vpre/ClassLibrary1?logo=nuget) | ![Stable](https://img.shields.io/nuget/v/ClassLibrary1?logo=nuget) | ![Downloads](https://img.shields.io/nuget/dt/ClassLibrary1?color=blueviolet&logo=nuget) |

## 🏭 Productivity Packages

Provides a convenient set of default API additions for ...

|Package|vNext|Stable|Downloads|
|:--|:-:|:-:|:-:|
| [ClassLibrary1.App](https://www.nuget.org/packages/ClassLibrary1.App/) | ![vNext](https://img.shields.io/nuget/vpre/ClassLibrary1.App?logo=nuget) | ![Stable](https://img.shields.io/nuget/v/ClassLibrary1.App?logo=nuget) | ![Downloads](https://img.shields.io/nuget/dt/ClassLibrary1.App?color=blueviolet&logo=nuget) |
| [Codebelt.Extensions.BenchmarkDotNet](https://www.nuget.org/packages/Codebelt.Extensions.BenchmarkDotNet/) | ![vNext](https://img.shields.io/nuget/vpre/Codebelt.Extensions.BenchmarkDotNet?logo=nuget) | ![Stable](https://img.shields.io/nuget/v/Codebelt.Extensions.BenchmarkDotNet?logo=nuget) | ![Downloads](https://img.shields.io/nuget/dt/Codebelt.Extensions.BenchmarkDotNet?color=blueviolet&logo=nuget) |
| [Codebelt.Extensions.BenchmarkDotNet.Console](https://www.nuget.org/packages/Codebelt.Extensions.BenchmarkDotNet.Console/) | ![vNext](https://img.shields.io/nuget/vpre/Codebelt.Extensions.BenchmarkDotNet.Console?logo=nuget) | ![Stable](https://img.shields.io/nuget/v/Codebelt.Extensions.BenchmarkDotNet.Console?logo=nuget) | ![Downloads](https://img.shields.io/nuget/dt/Codebelt.Extensions.BenchmarkDotNet.Console?color=blueviolet&logo=nuget) |
4 changes: 2 additions & 2 deletions .docfx/toc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- name: ClassLibrary1 API
href: api/ClassLibrary1.html
- name: Bootstrapper API
href: api/Codebelt.Extensions.BenchmarkDotNet.html
- name: NuGet
href: packages
50 changes: 25 additions & 25 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
description: 'Writing Unit Tests in ClassLibrary1'
description: 'Writing Unit Tests in Codebelt.Extensions.BenchmarkDotNet'
applyTo: "**/*.{cs,csproj}"
---

# Writing Unit Tests in ClassLibrary1
This document provides instructions for writing unit tests in the ClassLibrary1 codebase. Please follow these guidelines to ensure consistency and maintainability.
# Writing Unit Tests in Codebelt.Extensions.BenchmarkDotNet
This document provides instructions for writing unit tests in the Codebelt.Extensions.BenchmarkDotNet codebase. Please follow these guidelines to ensure consistency and maintainability.

## 1. Base Class

Expand Down Expand Up @@ -48,33 +48,33 @@ namespace Your.Namespace
## 5. File and Namespace Organization

- Place test files in the appropriate test project and folder structure.
- Use namespaces that mirror the source code structure. The namespace of a test file MUST match the namespace of the System Under Test (SUT). Do NOT append ".Tests", ".Benchmarks" or similar suffixes to the namespace. Only the assembly/project name should indicate that the file is a test/benchmark (for example: ClassLibrary1.Foo.Tests assembly, but namespace ClassLibrary1.Foo).
- Use namespaces that mirror the source code structure. The namespace of a test file MUST match the namespace of the System Under Test (SUT). Do NOT append ".Tests", ".Benchmarks" or similar suffixes to the namespace. Only the assembly/project name should indicate that the file is a test/benchmark (for example: Codebelt.Extensions.BenchmarkDotNet.Foo.Tests assembly, but namespace Codebelt.Extensions.BenchmarkDotNet.Foo).
- Example: If the SUT class is declared as:
```csharp
namespace ClassLibrary1.Foo.Bar
namespace Codebelt.Extensions.BenchmarkDotNet.Foo.Bar
{
public class Zoo { /* ... */ }
}
```
then the corresponding unit test class must use the exact same namespace:
```csharp
namespace ClassLibrary1.Foo.Bar
namespace Codebelt.Extensions.BenchmarkDotNet.Foo.Bar
{
public class ZooTest : Test { /* ... */ }
}
```
- Do NOT use:
```csharp
namespace ClassLibrary1.Foo.Bar.Tests { /* ... */ } // ❌
namespace ClassLibrary1.Foo.Bar.Benchmarks { /* ... */ } // ❌
namespace Codebelt.Extensions.BenchmarkDotNet.Foo.Bar.Tests { /* ... */ } // ❌
namespace Codebelt.Extensions.BenchmarkDotNet.Foo.Bar.Benchmarks { /* ... */ } // ❌
```
- The unit tests for the ClassLibrary1.Foo assembly live in the ClassLibrary1.Foo.Tests assembly.
- The functional tests for the ClassLibrary1.Foo assembly live in the ClassLibrary1.Foo.FunctionalTests assembly.
- Test class names end with Test and live in the same namespace as the class being tested, e.g., the unit tests for the Boo class that resides in the ClassLibrary1.Foo assembly would be named BooTest and placed in the ClassLibrary1.Foo namespace in the ClassLibrary1.Foo.Tests assembly.
- The unit tests for the Codebelt.Extensions.BenchmarkDotNet.Foo assembly live in the Codebelt.Extensions.BenchmarkDotNet.Foo.Tests assembly.
- The functional tests for the Codebelt.Extensions.BenchmarkDotNet.Foo assembly live in the Codebelt.Extensions.BenchmarkDotNet.Foo.FunctionalTests assembly.
- Test class names end with Test and live in the same namespace as the class being tested, e.g., the unit tests for the Boo class that resides in the Codebelt.Extensions.BenchmarkDotNet.Foo assembly would be named BooTest and placed in the Codebelt.Extensions.BenchmarkDotNet.Foo namespace in the Codebelt.Extensions.BenchmarkDotNet.Foo.Tests assembly.
- Modify the associated .csproj file to override the root namespace so the compiled namespace matches the SUT. Example:
```xml
<PropertyGroup>
<RootNamespace>ClassLibrary1.Foo</RootNamespace>
<RootNamespace>Codebelt.Extensions.BenchmarkDotNet.Foo</RootNamespace>
</PropertyGroup>
```
- When generating test scaffolding automatically, resolve the SUT's namespace from the source file (or project/assembly metadata) and use that exact namespace in the test file header.
Expand All @@ -91,7 +91,7 @@ using System.Globalization;
using Codebelt.Extensions.Xunit;
using Xunit;

namespace ClassLibrary1
namespace Codebelt.Extensions.BenchmarkDotNet
{
/// <summary>
/// Tests for the <see cref="DateSpan"/> class.
Expand Down Expand Up @@ -150,29 +150,29 @@ namespace ClassLibrary1
- Never mock IMarshaller; always use a new instance of JsonMarshaller.

---
description: 'Writing Performance Tests in ClassLibrary1'
description: 'Writing Performance Tests in Codebelt.Extensions.BenchmarkDotNet'
applyTo: "tuning/**, **/*Benchmark*.cs"
---

# Writing Performance Tests in ClassLibrary1
This document provides guidance for writing performance tests (benchmarks) in the ClassLibrary1 codebase using BenchmarkDotNet. Follow these guidelines to keep benchmarks consistent, readable, and comparable.
# Writing Performance Tests in Codebelt.Extensions.BenchmarkDotNet
This document provides guidance for writing performance tests (benchmarks) in the Codebelt.Extensions.BenchmarkDotNet codebase using BenchmarkDotNet. Follow these guidelines to keep benchmarks consistent, readable, and comparable.

## 1. Naming and Placement

- Place micro- and component-benchmarks under the `tuning/` folder or in projects named `*.Benchmarks`.
- Place benchmark files in the appropriate benchmark project and folder structure.
- Use namespaces that mirror the source code structure, e.g. do not suffix with `Benchmarks`.
- Namespace rule: DO NOT append `.Benchmarks` to the namespace. Benchmarks must live in the same namespace as the production assembly. Example: if the production assembly uses `namespace ClassLibrary1.Security.Cryptography`, the benchmark file should also use:
- Namespace rule: DO NOT append `.Benchmarks` to the namespace. Benchmarks must live in the same namespace as the production assembly. Example: if the production assembly uses `namespace Codebelt.Extensions.BenchmarkDotNet.Security.Cryptography`, the benchmark file should also use:
```
namespace ClassLibrary1.Security.Cryptography
namespace Codebelt.Extensions.BenchmarkDotNet.Security.Cryptography
{
public class Sha512256Benchmark { /* ... */ }
}
```
The class name may end with `Benchmark`, but the namespace must match the assembly (no `.Benchmarks` suffix).
- The benchmarks for the ClassLibrary1.Bar assembly live in the ClassLibrary1.Bar.Benchmarks assembly.
- Benchmark class names end with Benchmark and live in the same namespace as the class being measured, e.g., the benchmarks for the Zoo class that resides in the ClassLibrary1.Bar assembly would be named ZooBenchmark and placed in the ClassLibrary1.Bar namespace in the ClassLibrary1.Bar.Benchmarks assembly.
- Modify the associated .csproj file to override the root namespace, e.g., <RootNamespace>ClassLibrary1.Bar</RootNamespace>.
The class name must end with `Benchmark`, but the namespace must match the assembly (no `.Benchmarks` suffix).
- The benchmarks for the Codebelt.Extensions.BenchmarkDotNet.Bar assembly live in the Codebelt.Extensions.BenchmarkDotNet.Bar.Benchmarks assembly.
- Benchmark class names end with Benchmark and live in the same namespace as the class being measured, e.g., the benchmarks for the Zoo class that resides in the Codebelt.Extensions.BenchmarkDotNet.Bar assembly would be named ZooBenchmark and placed in the Codebelt.Extensions.BenchmarkDotNet.Bar namespace in the Codebelt.Extensions.BenchmarkDotNet.Bar.Benchmarks assembly.
- Modify the associated .csproj file to override the root namespace, e.g., <RootNamespace>Codebelt.Extensions.BenchmarkDotNet.Bar</RootNamespace>.

## 2. Attributes and Configuration

Expand Down Expand Up @@ -203,7 +203,7 @@ The class name may end with `Benchmark`, but the namespace must match the assemb
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Configs;

namespace ClassLibrary1
namespace Codebelt.Extensions.BenchmarkDotNet
{
[MemoryDiagnoser]
[GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByCategory)]
Expand Down Expand Up @@ -244,11 +244,11 @@ namespace ClassLibrary1
For further examples, refer to the benchmark files under the `tuning/` folder.

---
description: 'Writing XML documentation in ClassLibrary1'
description: 'Writing XML documentation in Codebelt.Extensions.BenchmarkDotNet'
applyTo: "**/*.cs"
---

# Writing XML documentation in ClassLibrary1
# Writing XML documentation in Codebelt.Extensions.BenchmarkDotNet
This document provides instructions for writing XML documentation.

## 1. Documentation Style
Expand Down
Loading
Loading