- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 482 for startTimer (0.34 sec)
-
src/os/removeall_test.go
b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { b.StopTimer() err := CopyFS(tmpDir, DirFS(".")) if err != nil { b.Fatal(err) } b.StartTimer() if err := RemoveAll(tmpDir); err != nil { b.Fatal(err) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:21:29 UTC 2024 - 12.3K bytes - Viewed (0) -
src/go/doc/testdata/testing.go
// // If a benchmark needs some expensive setup before running, the timer // may be stopped: // func BenchmarkBigLen(b *testing.B) { // b.StopTimer() // big := NewBig() // b.StartTimer() // for i := 0; i < b.N; i++ { // big.Len() // } // } package testing import ( "flag" "fmt" "os" "runtime" "runtime/pprof" "strconv" "strings"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Oct 02 02:28:27 UTC 2022 - 11.8K bytes - Viewed (0) -
src/fmt/scan_test.go
for i := 0; i < b.N; i++ { buf := bytes.NewBuffer(ints) b.StartTimer() scanInts(&r, buf) b.StopTimer() } } func BenchmarkScanRecursiveInt(b *testing.B) { b.StopTimer() ints := makeInts(intCount) var r RecursiveInt for i := 0; i < b.N; i++ { buf := bytes.NewBuffer(ints) b.StartTimer() Fscan(buf, &r) b.StopTimer() } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 23 20:25:13 UTC 2023 - 39.3K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
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) -
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) -
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)