- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for texts (0.58 sec)
-
tests/benchmark_test.go
package tests_test import ( "fmt" "testing" . "gorm.io/gorm/utils/tests" ) func BenchmarkCreate(b *testing.B) { user := *GetUser("bench", Config{}) for x := 0; x < b.N; x++ { user.ID = 0 DB.Create(&user) } } 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) } }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Jun 01 03:50:57 GMT 2022 - 1.5K bytes - Viewed (0) -
internal/grid/benchmark_test.go
} }) } }) } func BenchmarkStream(b *testing.B) { tests := []struct { name string fn func(b *testing.B, n int) }{ {name: "request", fn: benchmarkGridStreamReqOnly}, {name: "responses", fn: benchmarkGridStreamRespOnly}, } for _, test := range tests { b.Run(test.name, func(b *testing.B) { for n := 2; n <= 32; n *= 2 {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Nov 21 01:09:35 GMT 2023 - 12.2K bytes - Viewed (0)