- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for BenchmarkScan (0.09 sec)
-
tests/benchmark_test.go
} } func BenchmarkFind(b *testing.B) { user := *GetUser("find", Config{}) DB.Create(&user) for x := 0; x < b.N; x++ { DB.Find(&User{}, "id = ?", user.ID) } } func BenchmarkScan(b *testing.B) { user := *GetUser("scan", Config{}) DB.Create(&user) var u User b.ResetTimer() for x := 0; x < b.N; x++ { DB.Raw("select * from users where id = ?", user.ID).Scan(&u) } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 01 03:50:57 UTC 2022 - 1.5K bytes - Viewed (0)