1
0
mirror of https://github.com/TwiN/gatus.git synced 2026-02-15 08:00:05 +00:00

Close #124: Add support for Postgres as a storage solution

This commit is contained in:
TwinProduction
2021-09-10 18:00:04 -04:00
committed by Chris
parent 06ef7f9efe
commit bacf7d841b
47 changed files with 7593 additions and 244 deletions

View File

@@ -7,7 +7,7 @@ import (
"github.com/TwinProduction/gatus/core"
"github.com/TwinProduction/gatus/storage/store/common/paging"
"github.com/TwinProduction/gatus/storage/store/memory"
"github.com/TwinProduction/gatus/storage/store/sqlite"
"github.com/TwinProduction/gatus/storage/store/sql"
)
func BenchmarkStore_GetAllServiceStatuses(b *testing.B) {
@@ -15,7 +15,7 @@ func BenchmarkStore_GetAllServiceStatuses(b *testing.B) {
if err != nil {
b.Fatal("failed to create store:", err.Error())
}
sqliteStore, err := sqlite.NewStore("sqlite", b.TempDir()+"/BenchmarkStore_GetAllServiceStatuses.db")
sqliteStore, err := sql.NewStore("sqlite", b.TempDir()+"/BenchmarkStore_GetAllServiceStatuses.db")
if err != nil {
b.Fatal("failed to create store:", err.Error())
}
@@ -73,7 +73,7 @@ func BenchmarkStore_Insert(b *testing.B) {
if err != nil {
b.Fatal("failed to create store:", err.Error())
}
sqliteStore, err := sqlite.NewStore("sqlite", b.TempDir()+"/BenchmarkStore_Insert.db")
sqliteStore, err := sql.NewStore("sqlite", b.TempDir()+"/BenchmarkStore_Insert.db")
if err != nil {
b.Fatal("failed to create store:", err.Error())
}
@@ -145,7 +145,7 @@ func BenchmarkStore_GetServiceStatusByKey(b *testing.B) {
if err != nil {
b.Fatal("failed to create store:", err.Error())
}
sqliteStore, err := sqlite.NewStore("sqlite", b.TempDir()+"/BenchmarkStore_GetServiceStatusByKey.db")
sqliteStore, err := sql.NewStore("sqlite", b.TempDir()+"/BenchmarkStore_GetServiceStatusByKey.db")
if err != nil {
b.Fatal("failed to create store:", err.Error())
}