Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for SELECT (0.19 sec)

  1. tests/benchmark_test.go

    	b.ResetTimer()
    	for x := 0; x < b.N; x++ {
    		DB.Raw("select * from users where id = ?", user.ID).Scan(&u)
    	}
    }
    
    func BenchmarkScanSlice(b *testing.B) {
    	DB.Exec("delete from users")
    	for i := 0; i < 10_000; i++ {
    		user := *GetUser(fmt.Sprintf("scan-%d", i), Config{})
    		DB.Create(&user)
    	}
    
    	var u []User
    	b.ResetTimer()
    	for x := 0; x < b.N; x++ {
    		DB.Raw("select * from users").Scan(&u)
    	}
    }
    
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Wed Jun 01 03:50:57 GMT 2022
    - 1.5K bytes
    - Viewed (0)
  2. internal/grid/benchmark_test.go

    				for i := 0; i < responses; i++ {
    					toSend := GetByteBuffer()[:0]
    					toSend = append(toSend, byte(i))
    					toSend = append(toSend, payload...)
    					select {
    					case <-ctx.Done():
    						return nil
    					case out <- toSend:
    					}
    				}
    				return nil
    			},
    
    			Subroute:    "some-subroute",
    			OutCapacity: 1, // Only one message buffered.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 12.2K bytes
    - Viewed (0)
Back to top