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

Replace in-memory database with Turso (libSQL)

#3
Comparing
feature/turso-integration
(
ee2fad5
) with
main
(
a314e7c
)
CodSpeed Performance Gauge
-96%
Improvements
1
Regressions
5

Benchmarks

Failed

BenchmarkPostAlbumsValidRegression
api_test.go::BenchmarkPostAlbumsValid
CodSpeed Performance Gauge
-96%
284 µs7,135.5 µs
BenchmarkGetAlbumByIDNotFoundRegression
api_test.go::BenchmarkGetAlbumByIDNotFound
CodSpeed Performance Gauge
-13%
200.8 µs229.7 µs
BenchmarkGetAlbumByIDExistsRegression
api_test.go::BenchmarkGetAlbumByIDExists
CodSpeed Performance Gauge
-14%
421.4 µs490.8 µs
BenchmarkPostAlbumsEmptyBodyRegression
api_test.go::BenchmarkPostAlbumsEmptyBody
CodSpeed Performance Gauge
-13%
112.1 µs128.9 µs
BenchmarkGetAlbumsRegression
api_test.go::BenchmarkGetAlbums
CodSpeed Performance Gauge
-42%
176 µs306 µs

Improved

BenchmarkPostAlbumsInvalidJSON
api_test.go::BenchmarkPostAlbumsInvalidJSON
CodSpeed Performance Gauge
+38%
141.3 µs102.3 µs

Commits

Click on a commit to change the comparison range
Base
main
a314e7c
-96.02%
Replace in-memory database with Turso (libSQL) - Add Turso libSQL client dependency (github.com/tursodatabase/libsql-client-go) - Add SQLite driver for local file support (github.com/mattn/go-sqlite3) - Replace in-memory slice with libSQL database connection - Support both local file and remote Turso database via environment variables - Update all API handlers to use SQL queries instead of in-memory operations - Maintain backward compatibility with existing API endpoints - Database file: albums.db stores persistent album data locally Environment variables: - TURSO_DATABASE_URL: Database URL (defaults to file:./albums.db) - TURSO_AUTH_TOKEN: Authentication token for remote Turso database (optional) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
ee2fad5
3 days ago
by art049
© 2025 CodSpeed Technology
Home Terms Privacy Docs