- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 56 for newResource (0.34 sec)
-
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 Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 15.7K bytes - Viewed (0) -
src/internal/trace/mud_test.go
package trace import ( "math" "math/rand" "testing" ) func TestMUD(t *testing.T) { // Insert random uniforms and check histogram mass and // cumulative sum approximations. rnd := rand.New(rand.NewSource(42)) mass := 0.0 var mud mud for i := 0; i < 100; i++ { area, l, r := rnd.Float64(), rnd.Float64(), rnd.Float64() if rnd.Intn(10) == 0 { r = l } t.Log(l, r, area) mud.add(l, r, area)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.5K bytes - Viewed (0) -
cmd/erasure-common.go
"time" "github.com/minio/pkg/v3/sync/errgroup" ) 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() { defer wg.Done() if disks[i] == nil { return }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 4.6K bytes - Viewed (0) -
src/math/rand/rand.go
Source Uint64() uint64 } // NewSource returns a new pseudo-random [Source] seeded with the given value. // Unlike the default [Source] used by top-level functions, this source is not // safe for concurrent use by multiple goroutines. // The returned [Source] implements [Source64]. func NewSource(seed int64) Source { return newSource(seed) } func newSource(seed int64) *rngSource { var rng rngSource rng.Seed(seed)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 22:09:08 UTC 2024 - 16.9K bytes - Viewed (0) -
tensorflow/c/experimental/next_pluggable_device/c_api.cc
container_name, plugin_resource_name, &tf_plugin_resource, [plugin_resource_name, create_func, create_func_args, delete_func](tensorflow::PluginResource** new_resource) { void* opaque_plugin_resource = create_func(create_func_args); *new_resource = new tensorflow::PluginResource( opaque_plugin_resource, plugin_resource_name, delete_func); return absl::OkStatus(); });
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Apr 22 05:48:24 UTC 2024 - 13.9K bytes - Viewed (0) -
src/vendor/golang.org/x/net/nettest/conntest.go
}) defer timer.Stop() f(t, c1, c2) } // testBasicIO tests that the data sent on c1 is properly received on c2. func testBasicIO(t *testing.T, c1, c2 net.Conn) { want := make([]byte, 1<<20) rand.New(rand.NewSource(0)).Read(want) dataCh := make(chan []byte) go func() { rd := bytes.NewReader(want) if err := chunkedCopy(c1, rd); err != nil { t.Errorf("unexpected c1.Write error: %v", err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 12.2K bytes - Viewed (0) -
src/runtime/hash_test.go
"strings" "testing" "unsafe" ) func TestMemHash32Equality(t *testing.T) { if *UseAeshash { t.Skip("skipping since AES hash implementation is used") } var b [4]byte r := rand.New(rand.NewSource(1234)) seed := uintptr(r.Uint64()) for i := 0; i < 100; i++ { randBytes(r, b[:]) got := MemHash32(unsafe.Pointer(&b), seed) want := MemHash(unsafe.Pointer(&b), seed, 4) if got != want {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 17:50:18 UTC 2024 - 18.4K bytes - Viewed (0) -
src/hash/maphash/smhasher_test.go
var fixedSeed = MakeSeed() // Sanity checks. // hash should not depend on values outside key. // hash should not depend on alignment. func TestSmhasherSanity(t *testing.T) { t.Parallel() r := rand.New(rand.NewSource(1234)) const REP = 10 const KEYMAX = 128 const PAD = 16 const OFFMAX = 16 for k := 0; k < REP; k++ { for n := 0; n < KEYMAX; n++ { for i := 0; i < OFFMAX; i++ { var b [KEYMAX + OFFMAX + 2*PAD]byte
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 16:41:38 UTC 2024 - 11K bytes - Viewed (0) -
src/os/writeto_linux_test.go
t.Fatalf("failed to create temporary file: %v", err) } t.Cleanup(func() { f.Close() }) randSeed := time.Now().Unix() t.Logf("random data seed: %d\n", randSeed) prng := rand.New(rand.NewSource(randSeed)) data := make([]byte, size) prng.Read(data) if _, err := f.Write(data); err != nil { t.Fatalf("failed to create and feed the file: %v", err) } if err := f.Sync(); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 18:12:56 UTC 2024 - 4K bytes - Viewed (0) -
cmd/callhome.go
// initCallhome will start the callhome task in the background. func initCallhome(ctx context.Context, objAPI ObjectLayer) { if !globalCallhomeConfig.Enabled() { return } go func() { r := rand.New(rand.NewSource(time.Now().UnixNano())) // Leader node (that successfully acquires the lock inside runCallhome) // will keep performing the callhome. If the leader goes down for some reason,
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 17 16:53:34 UTC 2024 - 5.3K bytes - Viewed (0)