Created
December 28, 2021 20:52
-
-
Save andrewdoss-bit/181e16d222eaf7e2f9b85b01c6cb0477 to your computer and use it in GitHub Desktop.
pgx connection function benchmarks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package database | |
import ( | |
"testing" | |
) | |
func BenchmarkConnWithName(b *testing.B) { | |
for i := 0; i < b.N; i++ { | |
ConnWithName() | |
} | |
} | |
func BenchmarkConnWithoutName(b *testing.B) { | |
for i := 0; i < b.N; i++ { | |
ConnWithoutName() | |
} | |
} | |
func BenchmarkPoolWithName(b *testing.B) { | |
for i := 0; i < b.N; i++ { | |
PoolWithName() | |
} | |
} | |
func BenchmarkPoolWithoutName(b *testing.B) { | |
for i := 0; i < b.N; i++ { | |
PoolWithoutName() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment