2
0

Make getSharedConnection private again

This commit is contained in:
Jack Christensen
2013-07-16 08:32:49 -05:00
parent bae49077ce
commit 9640dc91e4
5 changed files with 32 additions and 32 deletions
+18 -18
View File
@@ -63,7 +63,7 @@ func restoreBinaryEncoders(encoders map[pgx.Oid]func(*pgx.MessageReader, int32)
}
func BenchmarkSelectRowSimpleNarrow(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createNarrowTestData(b, conn)
// Get random ids outside of timing
@@ -79,7 +79,7 @@ func BenchmarkSelectRowSimpleNarrow(b *testing.B) {
}
func BenchmarkSelectRowPreparedNarrow(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createNarrowTestData(b, conn)
// Get random ids outside of timing
@@ -95,7 +95,7 @@ func BenchmarkSelectRowPreparedNarrow(b *testing.B) {
}
func BenchmarkSelectRowsSimpleNarrow(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createNarrowTestData(b, conn)
// Get random ids outside of timing
@@ -111,7 +111,7 @@ func BenchmarkSelectRowsSimpleNarrow(b *testing.B) {
}
func BenchmarkSelectRowsPreparedNarrow(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createNarrowTestData(b, conn)
// Get random ids outside of timing
@@ -198,7 +198,7 @@ func createJoinsTestData(b *testing.B, conn *pgx.Connection) {
}
func BenchmarkSelectRowsSimpleJoins(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createJoinsTestData(b, conn)
sql := `
@@ -218,7 +218,7 @@ func BenchmarkSelectRowsSimpleJoins(b *testing.B) {
}
func BenchmarkSelectRowsPreparedJoins(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createJoinsTestData(b, conn)
b.ResetTimer()
@@ -253,7 +253,7 @@ func createInt2TextVsBinaryTestData(b *testing.B, conn *pgx.Connection) {
}
func BenchmarkInt2Text(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createInt2TextVsBinaryTestData(b, conn)
encoders := removeBinaryEncoders()
@@ -269,7 +269,7 @@ func BenchmarkInt2Text(b *testing.B) {
}
func BenchmarkInt2Binary(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createInt2TextVsBinaryTestData(b, conn)
mustPrepare(b, conn, "selectInt16", "select * from t")
defer func() { conn.Deallocate("selectInt16") }()
@@ -306,7 +306,7 @@ func createInt4TextVsBinaryTestData(b *testing.B, conn *pgx.Connection) {
}
func BenchmarkInt4Text(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createInt4TextVsBinaryTestData(b, conn)
encoders := removeBinaryEncoders()
@@ -322,7 +322,7 @@ func BenchmarkInt4Text(b *testing.B) {
}
func BenchmarkInt4Binary(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createInt4TextVsBinaryTestData(b, conn)
mustPrepare(b, conn, "selectInt32", "select * from t")
defer func() { conn.Deallocate("selectInt32") }()
@@ -359,7 +359,7 @@ func createInt8TextVsBinaryTestData(b *testing.B, conn *pgx.Connection) {
}
func BenchmarkInt8Text(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createInt8TextVsBinaryTestData(b, conn)
encoders := removeBinaryEncoders()
@@ -375,7 +375,7 @@ func BenchmarkInt8Text(b *testing.B) {
}
func BenchmarkInt8Binary(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createInt8TextVsBinaryTestData(b, conn)
mustPrepare(b, conn, "selectInt64", "select * from t")
defer func() { conn.Deallocate("selectInt64") }()
@@ -412,7 +412,7 @@ func createFloat4TextVsBinaryTestData(b *testing.B, conn *pgx.Connection) {
}
func BenchmarkFloat4Text(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createFloat4TextVsBinaryTestData(b, conn)
encoders := removeBinaryEncoders()
@@ -428,7 +428,7 @@ func BenchmarkFloat4Text(b *testing.B) {
}
func BenchmarkFloat4Binary(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createFloat4TextVsBinaryTestData(b, conn)
mustPrepare(b, conn, "selectFloat32", "select * from t")
defer func() { conn.Deallocate("selectFloat32") }()
@@ -465,7 +465,7 @@ func createFloat8TextVsBinaryTestData(b *testing.B, conn *pgx.Connection) {
}
func BenchmarkFloat8Text(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createFloat8TextVsBinaryTestData(b, conn)
encoders := removeBinaryEncoders()
@@ -481,7 +481,7 @@ func BenchmarkFloat8Text(b *testing.B) {
}
func BenchmarkFloat8Binary(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createFloat8TextVsBinaryTestData(b, conn)
mustPrepare(b, conn, "selectFloat32", "select * from t")
defer func() { conn.Deallocate("selectFloat32") }()
@@ -518,7 +518,7 @@ func createBoolTextVsBinaryTestData(b *testing.B, conn *pgx.Connection) {
}
func BenchmarkBoolText(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createBoolTextVsBinaryTestData(b, conn)
encoders := removeBinaryEncoders()
@@ -534,7 +534,7 @@ func BenchmarkBoolText(b *testing.B) {
}
func BenchmarkBoolBinary(b *testing.B) {
conn := GetSharedConnection()
conn := getSharedConnection()
createBoolTextVsBinaryTestData(b, conn)
mustPrepare(b, conn, "selectBool", "select * from t")
defer func() { conn.Deallocate("selectBool") }()