Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 1,994 for rend (0.1 sec)

  1. src/compress/flate/testdata/huffman-rand-limit.wb.expect

    Klaus Post <******@****.***> 1457448890 +0100
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 11 17:40:52 UTC 2016
    - 186 bytes
    - Viewed (0)
  2. src/crypto/rand/rand_test.go

    		t.Fatalf("Compressed %d -> %d", len(b), z.Len())
    	}
    }
    
    func TestReadEmpty(t *testing.T) {
    	n, err := Reader.Read(make([]byte, 0))
    	if n != 0 || err != nil {
    		t.Fatalf("Read(make([]byte, 0)) = %d, %v", n, err)
    	}
    	n, err = Reader.Read(nil)
    	if n != 0 || err != nil {
    		t.Fatalf("Read(nil) = %d, %v", n, err)
    	}
    }
    
    func BenchmarkRead(b *testing.B) {
    	b.Run("32", func(b *testing.B) {
    		benchmarkRead(b, 32)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 20:02:21 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/cache/expiring_test.go

    	}
    
    	b.ResetTimer()
    
    	b.SetParallelism(256)
    	b.RunParallel(func(pb *testing.PB) {
    		rand := rand.New(rand.NewSource(rand.Int63()))
    		for pb.Next() {
    			i := rand.Int31()
    			key := keys[i%numKeys]
    			_, ok := cache.Get(key)
    			if ok {
    				// compare lower bits of sampled i to decide whether we should evict.
    				if rand.Float64() < prob {
    					cache.Delete(key)
    				}
    			} else {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 22 15:51:23 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  4. test/ken/modconst.go

    // license that can be found in the LICENSE file.
    
    // Test integer modulus by constants.
    
    package main
    
    import "math/rand"
    
    const Count = 1e5
    
    func i64rand() int64 {
    	for {
    		a := int64(rand.Uint32())
    		a = (a << 32) | int64(rand.Uint32())
    		a >>= uint(rand.Intn(64))
    		if -a != a {
    			return a
    		}
    	}
    	return 0 // impossible
    }
    
    func i64test(a, b, c int64) {
    	d := a % c
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Sep 08 17:28:20 UTC 2019
    - 9.2K bytes
    - Viewed (0)
  5. internal/grid/benchmark_test.go

    	// Create n managers.
    	const payloadSize = 512
    	rng := rand.New(rand.NewSource(time.Now().UnixNano()))
    	payload := make([]byte, payloadSize)
    	_, err = rng.Read(payload)
    	errFatal(err)
    
    	for _, remote := range grid.Managers {
    		// Register a single handler which echos the payload.
    		errFatal(remote.RegisterStreamingHandler(handlerTest, StreamHandler{
    			// Send 10x requests.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  6. src/math/rand/race_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package rand_test
    
    import (
    	. "math/rand"
    	"sync"
    	"testing"
    )
    
    // TestConcurrent exercises the rand API concurrently, triggering situations
    // where the race detector is likely to detect issues.
    func TestConcurrent(t *testing.T) {
    	const (
    		numRoutines = 10
    		numCycles   = 10
    	)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 28 16:06:21 UTC 2021
    - 1.1K bytes
    - Viewed (0)
  7. 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)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  8. test/stress/runstress.go

    	if *v {
    		log.Println(a...)
    	}
    }
    
    func dialStress(a net.Addr) {
    	for {
    		d := net.Dialer{Timeout: time.Duration(rand.Intn(1e9))}
    		c, err := d.Dial("tcp", a.String())
    		if err == nil {
    			Println("did dial")
    			go func() {
    				time.Sleep(time.Duration(rand.Intn(500)) * time.Millisecond)
    				c.Close()
    				Println("closed dial")
    			}()
    		}
    		// Don't run out of ephemeral ports too quickly:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:21:35 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  9. pkg/kubelet/util/ioutils/ioutils_test.go

    limitations under the License.
    */
    
    package ioutils
    
    import (
    	"bytes"
    	"fmt"
    	"math/rand"
    	"testing"
    
    	"github.com/stretchr/testify/assert"
    )
    
    func TestLimitWriter(t *testing.T) {
    	r := rand.New(rand.NewSource(1234)) // Fixed source to prevent flakes.
    
    	tests := []struct {
    		inputSize, limit, writeSize int64
    	}{
    		// Single write tests
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 11 13:52:28 UTC 2019
    - 2K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/conc_alloc_test.go

    limitations under the License.
    */
    
    package flowcontrol
    
    import (
    	"math"
    	"math/rand"
    	"sort"
    	"testing"
    )
    
    // floating-point imprecision
    const fpSlack = 1e-10
    
    // TestConcAlloc tests computeConcurrencyAllocation with a bunch of randomly generated cases.
    func TestConcAlloc(t *testing.T) {
    	rands := rand.New(rand.NewSource(1234567890))
    	for i := 0; i < 10000; i++ {
    		test1ConcAlloc(t, rands)
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 07 18:17:27 UTC 2022
    - 5.3K bytes
    - Viewed (0)
Back to top