The benchmark project (FirebirdSql.Data.FirebirdClient.Benchmarks) measures performance of the Firebird .NET provider using BenchmarkDotNet.
- A running Firebird server accessible at
localhost(default configuration) - .NET 10 SDK
Use the convenience script from the repository root:
.\run-benchmark.ps1By default this runs CommandBenchmark. To select a different benchmark class:
.\run-benchmark.ps1 -Benchmark ConnectionBenchmark
.\run-benchmark.ps1 -Benchmark LargeFetchBenchmarkEnable JIT disassembly output:
.\run-benchmark.ps1 -DisasmEnable ETW profiling (Windows only):
.\run-benchmark.ps1 -ProfileOptions can be combined:
.\run-benchmark.ps1 -Benchmark LargeFetchBenchmark -DisasmFor full control over BenchmarkDotNet options, pass arguments directly after --:
dotnet run --project src\FirebirdSql.Data.FirebirdClient.Benchmarks\FirebirdSql.Data.FirebirdClient.Benchmarks.csproj --configuration Release -- --list flat
dotnet run --project src\FirebirdSql.Data.FirebirdClient.Benchmarks\FirebirdSql.Data.FirebirdClient.Benchmarks.csproj --configuration Release -- --filter "*Fetch*"By default the benchmark connects to:
database=localhost:benchmark.fdb;user=sysdba;password=masterkey
Override this with the FIREBIRD_BENCHMARK_CS environment variable:
$env:FIREBIRD_BENCHMARK_CS = "database=myhost:benchmark.fdb;user=sysdba;password=masterkey"
.\run-benchmark.ps1All benchmarks share a common configuration (BenchmarkConfig):
- Baseline job:
ReleaseNuGetbuild configuration — references the latest publishedFirebirdSql.Data.FirebirdClientNuGet package. - Candidate job:
Releasebuild configuration — references the local project source. - Runtime: .NET 10
- Diagnostics: Memory allocations (
MemoryDiagnoser) - Export: GitHub-flavored Markdown table (written to
BenchmarkDotNet.Artifacts/) - Ordering: Fastest to slowest
The NuGet baseline lets you compare the locally built provider against the published release to detect regressions or measure improvements.
Measures command execution over two data types (BIGINT, VARCHAR(10) CHARACTER SET UTF8):
| Benchmark | Description |
|---|---|
Execute / ExecuteAsync |
Inserts 100 rows using ExecuteNonQuery / ExecuteNonQueryAsync |
Fetch / FetchAsync |
Reads 100 rows using ExecuteReader / ExecuteReaderAsync |
Measures connection pool throughput:
| Benchmark | Description |
|---|---|
OpenClose / OpenCloseAsync |
Opens and closes a pooled connection |
Measures bulk read throughput for 100,000 rows across five data types:
| Data Type | Notes |
|---|---|
BIGINT |
Fixed-size integer |
CHAR(255) CHARACTER SET UTF8 |
Fixed-length string |
CHAR(255) CHARACTER SET OCTETS |
Fixed-length binary |
BLOB SUB_TYPE TEXT CHARACTER SET UTF8 |
Text blob |
BLOB SUB_TYPE BINARY |
Binary blob |
BenchmarkDotNet writes results to BenchmarkDotNet.Artifacts/ in the repository root. This directory is listed in .gitignore. Each run produces:
- A summary table in the console
- A GitHub-flavored Markdown file (
.md) suitable for pasting into issues or pull requests - An HTML report
- CSV data