- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 117 for randn (0.04 sec)
-
cmd/test-utils_test.go
// special value -1 means no explicit seeding. if seed != -1 { rand.Seed(seed) } return rand.Intn(max-min) + min } // Randomizes the order of bytes in the byte array // using Knuth Fisher-Yates shuffle algorithm. func randomizeBytes(s []byte, seed int64) []byte { // special value -1 means no explicit seeding. if seed != -1 { rand.Seed(seed) } n := len(s) var j int
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 01 22:13:18 UTC 2024 - 77K bytes - Viewed (0) -
cmd/metacache-entries_test.go
data/huffman-pi.wb.expect-noinput", "src/compress/flate/testdata/huffman-rand-1k.dyn.expect", "src/compress/flate/testdata/huffman-rand-1k.dyn.expect-noinput", "src/compress/flate/testdata/huffman-rand-1k.golden", "src/compress/flate/testdata/huffman-rand-1k.in", "src/compress/flate/testdata/huffman-rand-1k.wb.expect", "src/compress/flate/testdata/huffman-rand-1k.wb.expect-noinput", "src/compress/flate/testdata/huffman-rand-limit.dyn.expect", "src/compress/flate/testdata/huffman-rand-limit.dyn.expect-noinput",...
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 31.6K bytes - Viewed (0) -
api/go1.22.txt
pkg math/rand/v2, method (*Rand) Int32() int32 #61716 pkg math/rand/v2, method (*Rand) Int32N(int32) int32 #61716 pkg math/rand/v2, method (*Rand) Int64() int64 #61716 pkg math/rand/v2, method (*Rand) Int64N(int64) int64 #61716 pkg math/rand/v2, method (*Rand) IntN(int) int #61716 pkg math/rand/v2, method (*Rand) NormFloat64() float64 #61716 pkg math/rand/v2, method (*Rand) Perm(int) []int #61716
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Jan 24 20:54:27 UTC 2024 - 7.7K bytes - Viewed (0) -
internal/dsync/utils.go
package dsync import ( "math/rand" "time" ) func backoffWait(min, unit, cap time.Duration) func(*rand.Rand, uint) time.Duration { if unit > time.Hour { // Protect against integer overflow panic("unit cannot exceed one hour") } return func(r *rand.Rand, attempt uint) time.Duration { sleep := min sleep += unit * time.Duration(attempt)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat May 13 15:42:21 UTC 2023 - 1.2K bytes - Viewed (0) -
cmd/erasure-common.go
// along with this program. If not, see <http://www.gnu.org/licenses/>. package cmd import ( "context" "math/rand" "sync" "time" ) func (er erasureObjects) getOnlineDisks() (newDisks []StorageAPI) { disks := er.getDisks() var wg sync.WaitGroup var mu sync.Mutex r := rand.New(rand.NewSource(time.Now().UnixNano())) for _, i := range r.Perm(len(disks)) { i := i wg.Add(1) go func() {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Aug 12 08:38:15 UTC 2024 - 2.3K bytes - Viewed (0) -
internal/grid/benchmark_test.go
return &testResponse{ OrgNum: req.Num, OrgString: req.String, Embedded: *req, }, nil })) errFatal(err) } const payloadSize = 512 rng := rand.New(rand.NewSource(time.Now().UnixNano())) payload := make([]byte, payloadSize) _, err = rng.Read(payload) errFatal(err) // Wait for all to connect // Parallel writes per server. b.Run("bytes", func(b *testing.B) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 15.7K bytes - Viewed (0) -
cmd/dynamic-timeouts_test.go
func TestDynamicTimeoutConcurrent(t *testing.T) { // Race test. timeout := newDynamicTimeout(time.Second, time.Millisecond) var wg sync.WaitGroup for i := 0; i < runtime.GOMAXPROCS(0); i++ { wg.Add(1) rng := rand.New(rand.NewSource(int64(i))) go func() { defer wg.Done() for i := 0; i < 100; i++ { for j := 0; j < 100; j++ { timeout.LogSuccess(time.Duration(float64(time.Second) * rng.Float64())) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 14 10:08:40 UTC 2022 - 5.4K bytes - Viewed (0) -
internal/crypto/key_test.go
// along with this program. If not, see <http://www.gnu.org/licenses/>. package crypto import ( "bytes" "crypto/rand" "encoding/hex" "io" "testing" "github.com/minio/minio/internal/logger" ) var shortRandom = func(limit int64) io.Reader { return io.LimitReader(rand.Reader, limit) } func recoverTest(i int, shouldPass bool, t *testing.T) { if err := recover(); err == nil && !shouldPass {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 12 20:51:54 UTC 2024 - 6.7K bytes - Viewed (0) -
internal/dsync/locked_rand.go
// along with this program. If not, see <http://www.gnu.org/licenses/>. package dsync import ( "math/rand" "sync" ) // lockedRandSource provides protected rand source, implements rand.Source interface. type lockedRandSource struct { lk sync.Mutex src rand.Source } // Int63 returns a non-negative pseudo-random 63-bit integer as an int64. func (r *lockedRandSource) Int63() (n int64) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Oct 18 15:39:59 UTC 2021 - 1.3K bytes - Viewed (0) -
tests/tests_test.go
} func RunMigrations() { var err error allModels := []interface{}{&User{}, &Account{}, &Pet{}, &Company{}, &Toy{}, &Language{}, &Coupon{}, &CouponProduct{}, &Order{}, &Parent{}, &Child{}, &Tools{}} rand.Seed(time.Now().UnixNano()) rand.Shuffle(len(allModels), func(i, j int) { allModels[i], allModels[j] = allModels[j], allModels[i] }) DB.Migrator().DropTable("user_friends", "user_speaks")
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Sep 30 03:21:19 UTC 2024 - 3.3K bytes - Viewed (0)