Skip to content

docs: Add imposter to benchmark tests#519

Merged
vbreuss merged 2 commits intomainfrom
topic/compare-imposter
Mar 7, 2026
Merged

docs: Add imposter to benchmark tests#519
vbreuss merged 2 commits intomainfrom
topic/compare-imposter

Conversation

@vbreuss
Copy link
Contributor

@vbreuss vbreuss commented Mar 7, 2026

Adds the Imposter mocking library to the benchmark suite so its “happy path” setup/invoke/verify performance can be compared alongside existing frameworks.

Key Changes:

  • Add central package version for Imposter.
  • Reference Imposter from the benchmarks project.
  • Add an Imposter benchmark case and its required GenerateImposter assembly attribute.

@vbreuss vbreuss self-assigned this Mar 7, 2026
Copilot AI review requested due to automatic review settings March 7, 2026 06:09
@vbreuss vbreuss added the documentation Improvements or additions to documentation label Mar 7, 2026
@vbreuss vbreuss force-pushed the topic/compare-imposter branch from 474055c to 0fd8676 Compare March 7, 2026 06:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the Imposter mocking library to the benchmark suite so its “happy path” setup/invoke/verify performance can be compared alongside existing frameworks.

Changes:

  • Add central package version for Imposter.
  • Reference Imposter from the benchmarks project.
  • Add an Imposter benchmark case and its required GenerateImposter assembly attribute.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
Directory.Packages.props Adds a centrally-managed version entry for Imposter.
Benchmarks/Mockolate.Benchmarks/Mockolate.Benchmarks.csproj Adds a package reference so the benchmark project can use Imposter.
Benchmarks/Mockolate.Benchmarks/HappyCaseBenchmarks.Simple.cs Introduces Simple_Imposter() and the assembly-level Imposter generation attribute.
Comments suppressed due to low confidence (1)

Benchmarks/Mockolate.Benchmarks/HappyCaseBenchmarks.Simple.cs:107

  • Avoid committing TODO placeholders in benchmark interfaces unless they are tied to an actionable follow-up (issue/PR). If this is not being implemented imminently, please remove the TODO to keep the benchmark scenario focused and avoid noise in TODO tracking.
	}

@github-actions
Copy link

github-actions bot commented Mar 7, 2026

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763 2.61GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.103
[Host] : .NET 10.0.3 (10.0.3, 10.0.326.7603), X64 RyuJIT x86-64-v3

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Method Mean Error StdDev Gen0 Gen1 Allocated
Simple_Mockolate 1,598.3 ns 14.57 ns 12.91 ns 0.2460 - 4.02 KB
Simple_Moq 181,805.5 ns 669.62 ns 593.60 ns 0.4883 - 14.55 KB
Simple_NSubstitute 5,809.2 ns 41.15 ns 38.49 ns 0.5569 0.0076 9.14 KB
Simple_FakeItEasy 6,628.2 ns 75.46 ns 70.58 ns 0.4959 - 8.11 KB
Simple_Imposter 679.7 ns 6.08 ns 5.69 ns 0.2537 0.0029 4.15 KB
Simple_TUnitMocks 2,375.9 ns 62.36 ns 58.33 ns 0.4005 0.0076 6.55 KB

@github-actions
Copy link

github-actions bot commented Mar 7, 2026

Test Results

    21 files  ±0      21 suites  ±0   5m 26s ⏱️ -59s
 2 805 tests ±0   2 804 ✅ ±0  1 💤 ±0  0 ❌ ±0 
18 852 runs  ±0  18 851 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit ef71f47. ± Comparison against base commit 2ab1cb1.

♻️ This comment has been updated with latest results.

Copilot AI review requested due to automatic review settings March 7, 2026 06:28
@vbreuss vbreuss force-pushed the topic/compare-imposter branch from cb18ccc to ef71f47 Compare March 7, 2026 06:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 7, 2026

@vbreuss vbreuss merged commit 3732cc9 into main Mar 7, 2026
16 checks passed
@vbreuss vbreuss deleted the topic/compare-imposter branch March 7, 2026 06:35
@github-actions
Copy link

This is addressed in release v1.6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation state: released The issue is released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants