Avatar for the CodSpeedHQ user
CodSpeedHQ
go-gin-benchmarks-example
BlogDocsChangelog

Replace in-memory database with SQLite

#4
Comparing
feature/sqlite-database
(
cb7e886
) with
main
(
a314e7c
)
CodSpeed Performance Gauge
-96%
Improvements
2
Regressions
3
Untouched
1

Benchmarks

Failed

BenchmarkGetAlbumByIDNotFoundRegression
api_test.go::BenchmarkGetAlbumByIDNotFound
CodSpeed Performance Gauge
-24%
200.8 µs263.6 µs
BenchmarkGetAlbumsRegression
api_test.go::BenchmarkGetAlbums
CodSpeed Performance Gauge
-43%
176 µs311.2 µs
BenchmarkPostAlbumsValidRegression
api_test.go::BenchmarkPostAlbumsValid
CodSpeed Performance Gauge
-96%
284 µs6,999.5 µs

Improved

BenchmarkPostAlbumsInvalidJSON
api_test.go::BenchmarkPostAlbumsInvalidJSON
CodSpeed Performance Gauge
+49%
141.3 µs95 µs
BenchmarkPostAlbumsEmptyBody
api_test.go::BenchmarkPostAlbumsEmptyBody
CodSpeed Performance Gauge
+18%
112.1 µs95.3 µs

Passed

BenchmarkGetAlbumByIDExists
api_test.go::BenchmarkGetAlbumByIDExists
CodSpeed Performance Gauge
+2%
421.4 µs412.3 µs

Commits

Click on a commit to change the comparison range
Base
main
a314e7c
-95.94%
Replace in-memory database with SQLite - Add SQLite driver dependency (github.com/mattn/go-sqlite3) - Create initDB() function to initialize SQLite database with schema - Update all API handlers to use SQL queries instead of in-memory slice - Seed database with initial album data on first run - Update benchmark setup to initialize database for testing - Database file: albums.db stores persistent album data 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
cb7e886
3 days ago
by art049
© 2025 CodSpeed Technology
Home Terms Privacy Docs