Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Sep 14, 2025

Summary

  • Added PostgreSQL comparison support using Npgsql.EntityFrameworkCore.PostgreSQL
  • Created PostgreSQL namespace with PostgreSQLDbContext and PostgreSQLTestRun classes
  • Updated benchmark configuration to include PostgreSQL performance measurements
  • Enhanced manual comparison mode to include PostgreSQL results
  • Upgraded target framework to .NET 7.0 for package compatibility

Implementation Details

New Files

  • PostgreSQL/PostgreSQLDbContext.cs - Entity Framework context for PostgreSQL using Npgsql
  • PostgreSQL/PostgreSQLTestRun.cs - Test runner implementation following the same pattern as SQLite

Modified Files

  • Comparisons.SQLiteVSDoublets.csproj - Added Npgsql.EntityFrameworkCore.PostgreSQL dependency and upgraded to .NET 7.0
  • Benchmarks.cs - Added PostgreSQL benchmark methods with disk size tracking
  • Program.cs - Integrated PostgreSQL into manual comparison mode

Configuration

The PostgreSQL implementation uses a configurable connection string (currently set to "Host=localhost;Database=test;Username=test;Password=test") and creates the same table structure as SQLite for consistent comparison.

Test plan

  • Implement PostgreSQL database context with Entity Framework Core
  • Create PostgreSQL test runner following existing patterns
  • Integrate PostgreSQL benchmarks into BenchmarkDotNet configuration
  • Update manual comparison mode to include PostgreSQL
  • Add disk size tracking for PostgreSQL like SQLite and Doublets
  • Verify PostgreSQL benchmarks run correctly with local PostgreSQL instance
  • Confirm performance metrics are captured and reported properly

🤖 Generated with Claude Code


Resolves #33

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #33
@konard konard self-assigned this Sep 14, 2025
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>
@konard konard changed the title [WIP] Add a comparison with Npgsql.EntityFrameworkCore.PostgreSQL Add PostgreSQL comparison with Npgsql.EntityFrameworkCore.PostgreSQL Sep 14, 2025
@konard konard marked this pull request as ready for review September 14, 2025 00:48
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.

Add a comparison with Npgsql.EntityFrameworkCore.PostgreSQL

2 participants