Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 514 for startTimer (2.22 sec)

  1. src/expvar/expvar_test.go

    		c, err := net.Dial("tcp", ln.Addr().String())
    		if err != nil {
    			<-done
    			b.Fatalf("Dial failed: %v", err)
    		}
    		clients[p] = c
    	}
    	if !<-done {
    		b.FailNow()
    	}
    
    	b.StartTimer()
    
    	var wg sync.WaitGroup
    	wg.Add(4 * P)
    	for p := 0; p < P; p++ {
    		// Client writer.
    		go func(c net.Conn) {
    			defer wg.Done()
    			var buf [1]byte
    			for i := 0; i < N; i++ {
    				v := byte(i)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:46:19 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  2. src/go/scanner/scanner_test.go

    		}
    	}
    }
    
    func BenchmarkScan(b *testing.B) {
    	b.StopTimer()
    	fset := token.NewFileSet()
    	file := fset.AddFile("", fset.Base(), len(source))
    	var s Scanner
    	b.StartTimer()
    	for i := 0; i < b.N; i++ {
    		s.Init(file, source, nil, ScanComments)
    		for {
    			_, tok, _ := s.Scan()
    			if tok == token.EOF {
    				break
    			}
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 15:38:31 UTC 2023
    - 34.6K bytes
    - Viewed (0)
  3. pilot/pkg/xds/bench_test.go

    		}
    	}
    	bytes := 0
    	for _, r := range m {
    		bytes += len(r.GetResource().Value)
    	}
    	b.ReportMetric(float64(bytes)/1000, "kb/msg")
    	b.ReportMetric(float64(len(m)), "resources/msg")
    	b.StartTimer()
    }
    
    func createEndpointsConfig(numEndpoints, numServices, numNetworks int) []config.Config {
    	result := make([]config.Config, 0, numServices)
    	for s := 0; s < numServices; s++ {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 22 18:13:40 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  4. src/net/tcpsock_test.go

    		}
    		done <- true
    	}()
    	for p := 0; p < P; p++ {
    		c, err := Dial("tcp", ln.Addr().String())
    		if err != nil {
    			b.Fatal(err)
    		}
    		clients[p] = c
    	}
    	<-done
    
    	b.StartTimer()
    
    	var wg sync.WaitGroup
    	wg.Add(4 * P)
    	for p := 0; p < P; p++ {
    		// Client writer.
    		go func(c Conn) {
    			defer wg.Done()
    			var buf [1]byte
    			for i := 0; i < N; i++ {
    				v := byte(i)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 06:04:31 UTC 2024
    - 17.7K bytes
    - Viewed (0)
  5. src/runtime/gc_test.go

    	for j := 0; j < 10; j++ {
    		ready.Add(1)
    		go func() {
    			x := 100000
    			countpwg(&x, &ready, teardown)
    		}()
    	}
    	ready.Wait()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		b.StartTimer()
    		runtime.GC()
    		runtime.GC()
    		b.StopTimer()
    	}
    	close(teardown)
    }
    
    func BenchmarkMSpanCountAlloc(b *testing.B) {
    	// Allocate one dummy mspan for the whole benchmark.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 05 22:33:52 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  6. src/runtime/proc_test.go

    	b.StopTimer()
    	// matmult is O(N**3) but testing expects O(b.N),
    	// so we need to take cube root of b.N
    	n := int(math.Cbrt(float64(b.N))) + 1
    	A := makeMatrix(n)
    	B := makeMatrix(n)
    	C := makeMatrix(n)
    	b.StartTimer()
    	matmult(nil, A, B, C, 0, n, 0, n, 0, n, 8)
    }
    
    func makeMatrix(n int) Matrix {
    	m := make(Matrix, n)
    	for i := 0; i < n; i++ {
    		m[i] = make([]float64, n)
    		for j := 0; j < n; j++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 25.8K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/util/starttime.go

    package util
    
    import (
    	"time"
    )
    
    // startTime is a variable that represents the start time of the kubeadm process.
    // It can be used to consistently use the same start time instead of calling time.Now()
    // in multiple locations and ending up with minor time deviations.
    var startTime time.Time
    
    func init() {
    	startTime = time.Now()
    }
    
    // StartTimeUTC returns startTime with its location set to UTC.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 1K bytes
    - Viewed (0)
  8. src/net/http/request_test.go

    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		// Perform some setup.
    		b.StopTimer()
    		if _, err := f.Seek(0, 0); err != nil {
    			b.Fatalf("Failed to seek back to file: %v", err)
    		}
    
    		b.StartTimer()
    		req, err := NewRequest("PUT", cst.URL, io.NopCloser(f))
    		if err != nil {
    			b.Fatal(err)
    		}
    
    		req.ContentLength = n
    		// Prevent mime sniffing by setting the Content-Type.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 18:42:34 UTC 2024
    - 44K bytes
    - Viewed (0)
  9. src/net/http/serve_test.go

    	b.ReportAllocs()
    	b.StopTimer()
    	ts := newClientServerTest(b, mode, HandlerFunc(func(rw ResponseWriter, r *Request) {
    		fmt.Fprintf(rw, "Hello world.\n")
    	})).ts
    	b.StartTimer()
    
    	c := ts.Client()
    	for i := 0; i < b.N; i++ {
    		res, err := c.Get(ts.URL)
    		if err != nil {
    			b.Fatal("Get:", err)
    		}
    		all, err := io.ReadAll(res.Body)
    		res.Body.Close()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
  10. pkg/scheduler/internal/cache/cache_test.go

    func benchmarkExpire(b *testing.B, podNum int) {
    	logger, _ := ktesting.NewTestContext(b)
    	now := time.Now()
    	for n := 0; n < b.N; n++ {
    		b.StopTimer()
    		cache := setupCacheWithAssumedPods(b, podNum, now)
    		b.StartTimer()
    		cache.cleanupAssumedPods(logger, now.Add(2*time.Second))
    	}
    }
    
    type testingMode interface {
    	Fatalf(format string, args ...interface{})
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 17 01:38:03 UTC 2023
    - 63.8K bytes
    - Viewed (0)
Back to top