Repository navigation
Add Npgsql EF Core PostgreSQL object benchmarks - #99
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #33
This commit adds PostgreSQL support to the comparison benchmarks alongside SQLite and Doublets. The implementation includes: - Added Npgsql.EntityFrameworkCore.PostgreSQL package dependency - Created PostgreSQL namespace with PostgreSQLDbContext and PostgreSQLTestRun - Updated benchmark configuration to include PostgreSQL benchmarks - Updated Program.cs to include PostgreSQL in manual comparisons - Upgraded target framework to .NET 7.0 for compatibility The PostgreSQL implementation follows the same patterns as the SQLite implementation, allowing for consistent performance comparisons across all three data storage approaches. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
We need to make sure this fully fits to our benchmarking architecture and adds value, not reduce it. |
|
🤖 AI Work Session Started Starting automated work session at 2026-10-05T21:44:17.808Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback. Runtime: solve |
Working session summaryUpdated PR #99 and marked it ready for review. PostgreSQL EF Core now uses the shared benchmark harness for both id widths, with regression tests and separate server storage metrics. Merge conflicts are resolved, all checks pass, and the working tree is clean. This summary was automatically extracted from the AI working session output. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (214.4K + 5.4M cached) input tokens, 41.7K output tokens, $2.558980 cost 🤖 Models used:
📎 Log file uploaded as Gist (3994KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🎉 Auto-mergedThis pull request has been automatically merged by hive-mind.
Auto-merged by hive-mind with --auto-merge flag |
Fixes #33.
Adds
PostgreSQL_EFCorewith Npgsql.EntityFrameworkCore.PostgreSQL 10.0.3 to the maintained .NET 10 object benchmark harness. PostgreSQL runs the same deterministic blog posts, warm-ups, fresh-store repetitions, transaction boundaries, scattered point reads and checksum-validated create/read/delete operations as the existing stores, with both 32-bit and 64-bit ids. All SQLite providers, Doublets variants and Rust/link benchmarks are preserved.Changes
IBlogPostsStorage<T>with EF Core saves, untracked reads and deletes by id. Clear EF tracking after each save so reads reach the server and tracking does not grow with the dataset. Store dates as the shared integer Unix seconds and allow duplicate titles.POSTGRESQL_CONNECTION_STRING. Runs without it retain the existing embedded defaults; explicit PostgreSQL selection without it fails with a setup message. OptionalPOSTGRESQL_VERBOSE=1enables EF diagnostics without sensitive values.mainwithout rewriting history and resolve the deleted-root-project conflicts by using the current harness. Update both READMEs with setup and reproducible commands; published historical measurements are preserved.Reproduction and regression coverage
Before implementation,
PostgreSQLUsesTheObjectsHarnessfails for the absent variant. Three report tests also fail: PostgreSQL incorrectly selectsSQLite_Memoryas its baseline, server bytes are omitted, and missing PostgreSQL version metadata is accepted. They now pass. Artifact validation rejects a missing PostgreSQL result in a C# object benchmark cell.Database tests cover both id widths and repeated validated lifecycles, Unicode/empty strings, duplicate titles, date zero, server reads after an external update, rollback/reuse and isolated schema cleanup.
experiments/postgresql/check_reports.pyverifies executable JSON, metadata, operation/sample sets, server bytes, all 12 embedded defaults without server configuration, and explicit configuration failures.Validation
Historical failed CI runs
17704198070and17704191247match the September 2025 draft commits, but their logs have expired (HTTP 410); available annotations contain only the exit status. Investigation and reproduction details document that limit and the architecture decisions. All hosted checks pass at final commitabd525c: C# and PostgreSQL integration, all eight benchmark cells and artifact/report validation, workflow and Python quality, and dependency audit. Codacy and CodeFactor also pass.Bounded runs verify correctness and report integration; they do not establish a general performance advantage. No UI changes.
Changes
.github/workflows/benchmarks.yml.github/workflows/csharp.ymlREADME.mdREADME.ru.mdcsharp/SQLiteVSDoublets.Tests/PostgreSQLTests.cscsharp/SQLiteVSDoublets.Tests/StoragesTests.cscsharp/SQLiteVSDoublets/Harness.cscsharp/SQLiteVSDoublets/PostgreSQLBlogPosts.cscsharp/SQLiteVSDoublets/Program.cscsharp/SQLiteVSDoublets/SQLiteVSDoublets.csprojdev/log/issues/33/pulls/99/ANALYSIS.mdexperiments/postgresql/check_reports.pyscripts/benchmark_ci.pyscripts/benchmark_report.pyscripts/test_benchmark_ci.pyscripts/test_postgresql_report.py