Add lab 3 scaling research and database bottleneck evidence

This commit is contained in:
2026-10-30 11:42:36 +03:00
parent a2cb1ad2ae
commit b7475e62e6
498 changed files with 79370 additions and 1 deletions
+5
View File
@@ -45,6 +45,11 @@ func main() {
os.Exit(1)
}
defer pool.Close()
if os.Getenv("PG_POOL_DIAGNOSTICS") == "1" {
diagnosticsCtx, stopDiagnostics := context.WithCancel(context.Background())
defer stopDiagnostics()
go logPoolStats(diagnosticsCtx, pool)
}
queries := sqlc.New(pool)