This file contains hidden or 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
func benchmarkBulkCreate(size int, b *testing.B) { | |
db, err := gorm.Open("postgres", "host=localhost port=5432 user=testuser dbname=testdb password=123456 sslmode=disable") | |
if err != nil { | |
fmt.Println(err) | |
} | |
defer db.Close() | |
users := stubUsers(b) | |
tx := db.Begin() | |
chunkList := funk.Chunk(users, size) |
This file contains hidden or 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
func benchmarkBulkCreate(size int, b *testing.B) { | |
db, err := gorm.Open("postgres", "host=localhost port=5432 user=testuser dbname=testdb password=123456 sslmode=disable") | |
if err != nil { | |
fmt.Println(err) | |
} | |
defer db.Close() | |
users := stubUsers(b) | |
tx := db.Begin() | |
chunkList := funk.Chunk(users, size) |
OlderNewer