Skip to content

Benchmarks: Dapper.AOT variant on the real providers, and no per-call stamps on the benchmark path - #142

Merged
electricessence merged 2 commits into
masterfrom
bench/real-v7a
Nov 15, 2026
Merged

electricessence merged 2 commits into
masterfrom
bench/real-v7a

Conversation

@electricessence

Copy link
Copy Markdown
Collaborator

What this adds

A Dapper.AOT variant (V7a) in the real-provider benchmarks, next to plain Dapper (V7), so ODX's mapping paths can be compared with source-generated Dapper on SQL Server and SQLite. Benchmarks/ only: no change to Source/, tests, docs or build props.

  • RealProviderDapperAot.cs: the one class that carries [DapperAot] (Dapper.AOT 1.1.0 is already referenced by the project). V7a is the same call as V7 (a buffered Query<SynRow>(sql).AsList()), run through the same timing path as the other variants. One intercepted call site serves both providers.
  • RealProviderBenchmarks.cs: the V7a_Sync benchmark; RealProviderChecks.cs: --verify-rp also checks V7a against the oracle and against V2; RealProviderVariants.cs: a comment.
  • Timing wrapper: the real-provider BenchmarkDotNet cases no longer stamp every Read and getter call (a per-call stamping reader skewed rows with different numbers of wrapped calls per row). A TimedReaderMode enum selects between per-call stamps (the IN6 and S4 probes, unchanged) and a reader-open-only reader (plain forwards, as before); --verify-rp checks that the benchmark path records no per-call stamps.
  • Plain Dapper stays plain: the generated interceptors cover only the V7a call site (and the synthetic variant's one site from the earlier change); no other call is intercepted.

Checks

  • --verify-rp passes (374 checks, both target frameworks, SQLite and SQL Server LocalDB, widths 5 and 20, rows 1, 100 and 10,000); a deliberate corruption of V7a fails it.
  • Release build of both target frameworks with 0 warnings; style and analyzers at severity info report 0 findings; the other self-tests pass.
  • The full test gate and a Visual Studio MSBuild of the solution are green.
  • Leak scan clean.

🤖 Generated with Claude Code

electricessence and others added 2 commits November 15, 2026 09:03
RealProviderDapperAot.V7a is the V7 call (buffered Query<SynRow>(sql).AsList())
in its own class carrying [DapperAot]; one call site serves SQL Server and
SQLite because the interceptor takes the IDbConnection it is given. V7 stays
on plain Dapper. V7a_Sync is a benchmark next to V7_Sync; --verify-rp checks
it against the oracle (every benchmark method) and against V2.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The timing wrapper stamped every Read, getter and IsDBNull (two timestamps
each), which skews paths that make different numbers of wrapped calls per row.
TimedConnection takes a TimedReaderMode: PerCallStamps (the default, used by
the IN6 and S4 probes, unchanged) or ReaderOpenOnly (OpenCloseTimedReader:
plain forwards, only the open and close of the reader are stamped, as in the
Cut B build). The real-provider benchmark cases use ReaderOpenOnly.
--verify-rp checks that the benchmark path's per-call counters stay at zero
while the open/close stamps are recorded, and that a default wrapper still
stamps.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@electricessence
electricessence merged commit c320e3e into master Nov 15, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant