CodSpeedHQ
go-gin-benchmarks-example
BlogDocsChangelog

Replace in-memory database with SQLite

#1
Comparing
feature/sqlite-database
(
3c7d0e9
) with
main
(
769218c
)
CodSpeed Performance Gauge
-86%
Regressions
3
Untouched
3

Benchmarks

Failed

BenchmarkGetAlbums
api_test.go
Regression
CodSpeed Performance Gauge
-83%
15.7 µs92.5 µs
BenchmarkGetAlbumByIDExists
api_test.go
Regression
CodSpeed Performance Gauge
-86%
10.9 µs77.6 µs
BenchmarkGetAlbumByIDNotFound
api_test.go
Regression
CodSpeed Performance Gauge
-85%
10.1 µs66.8 µs

Passed

BenchmarkPostAlbumsEmptyBody
api_test.go
CodSpeed Performance Gauge
0%
6.3 µs6.3 µs
BenchmarkPostAlbumsInvalidJSON
api_test.go
CodSpeed Performance Gauge
-2%
6.3 µs6.5 µs
BenchmarkPostAlbumsValid
api_test.go
CodSpeed Performance Gauge
-2%
6.3 µs6.4 µs

Commits

Click on a commit to change the comparison range
Base
main
769218c
-85.89%
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>
3c7d0e9
23 days ago
by art049
© 2025 CodSpeed Technology
Home Terms Privacy Docs