Add lab 3 scaling research and database bottleneck evidence
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user