Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 75 for RunParallel (0.17 sec)

  1. src/regexp/all_test.go

    	re := MustCompile("foo (ba+r)? baz")
    	b.ResetTimer()
    	b.RunParallel(func(pb *testing.PB) {
    		for pb.Next() {
    			re.Match(x)
    		}
    	})
    }
    
    func BenchmarkMatchParallelCopied(b *testing.B) {
    	x := []byte("this is a long line that contains foo bar baz")
    	re := MustCompile("foo (ba+r)? baz")
    	b.ResetTimer()
    	b.RunParallel(func(pb *testing.PB) {
    		re := re.Copy()
    		for pb.Next() {
    			re.Match(x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  2. plugin/pkg/auth/authorizer/node/node_authorizer_test.go

    	g := NewGraph()
    	populate(g, nodes, pods, pvs, attachments, slices)
    	// Garbage collect before the first iteration
    	runtime.GC()
    	b.ResetTimer()
    
    	b.SetParallelism(100)
    	b.RunParallel(func(pb *testing.PB) {
    		for pb.Next() {
    			g.AddPod(pods[0])
    		}
    	})
    }
    
    func BenchmarkAuthorization(b *testing.B) {
    	g := NewGraph()
    
    	opts := &sampleDataOpts{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:55 UTC 2024
    - 40.5K bytes
    - Viewed (0)
  3. src/math/rand/rand_test.go

    		})
    	}
    }
    
    // Benchmarks
    
    func BenchmarkInt63Threadsafe(b *testing.B) {
    	for n := b.N; n > 0; n-- {
    		Int63()
    	}
    }
    
    func BenchmarkInt63ThreadsafeParallel(b *testing.B) {
    	b.RunParallel(func(pb *testing.PB) {
    		for pb.Next() {
    			Int63()
    		}
    	})
    }
    
    func BenchmarkInt63Unthreadsafe(b *testing.B) {
    	r := New(NewSource(1))
    	for n := b.N; n > 0; n-- {
    		r.Int63()
    	}
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator_test.go

    			return s.lookup(ctx, token)
    		}),
    		true,
    		4*time.Second,
    		500*time.Millisecond,
    		clock.RealClock{},
    	)
    
    	b.ResetTimer()
    	b.SetParallelism(s.threadCount)
    	b.RunParallel(func(pb *testing.PB) {
    		r := mathrand.New(mathrand.NewSource(mathrand.Int63()))
    		for pb.Next() {
    			// some problems appear with random access, some appear with many
    			// requests for a single entry, so we do both.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 20.3K bytes
    - Viewed (0)
  5. src/net/rpc/server_test.go

    	once.Do(startServer)
    	client, err := dial()
    	if err != nil {
    		b.Fatal("error dialing:", err)
    	}
    	defer client.Close()
    
    	// Synchronous calls
    	args := &Args{7, 8}
    	b.ResetTimer()
    
    	b.RunParallel(func(pb *testing.PB) {
    		reply := new(Reply)
    		for pb.Next() {
    			err := client.Call("Arith.Add", args, reply)
    			if err != nil {
    				b.Fatalf("rpc error: Add: expected no error but got string %q", err.Error())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 18 05:23:29 UTC 2023
    - 19K bytes
    - Viewed (0)
  6. src/time/sleep_test.go

    			garbage := make([]*Timer, 1<<15)
    			for j := range garbage {
    				garbage[j] = AfterFunc(Hour, nil)
    			}
    			garbageAll[i] = garbage
    		}(i)
    	}
    	wg.Wait()
    
    	b.ResetTimer()
    	b.RunParallel(bench)
    	b.StopTimer()
    
    	for _, garbage := range garbageAll {
    		for _, t := range garbage {
    			t.Stop()
    		}
    	}
    }
    
    func BenchmarkAfterFunc1000(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 16:33:57 UTC 2024
    - 22.5K bytes
    - Viewed (0)
  7. src/encoding/xml/marshal_test.go

    	}
    }
    
    func BenchmarkMarshal(b *testing.B) {
    	b.ReportAllocs()
    	b.RunParallel(func(pb *testing.PB) {
    		for pb.Next() {
    			Marshal(atomValue)
    		}
    	})
    }
    
    func BenchmarkUnmarshal(b *testing.B) {
    	b.ReportAllocs()
    	xml := []byte(atomXML)
    	b.RunParallel(func(pb *testing.PB) {
    		for pb.Next() {
    			Unmarshal(xml, &Feed{})
    		}
    	})
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 18:46:41 UTC 2024
    - 66K bytes
    - Viewed (0)
  8. src/runtime/proc_test.go

    	runtime.GC()
    
    	iters := int(1e5)
    	if testing.Short() {
    		iters = 1e2
    	}
    	runtime.RunSchedLocalQueueEmptyTest(iters)
    }
    
    func benchmarkStackGrowth(b *testing.B, rec int) {
    	b.RunParallel(func(pb *testing.PB) {
    		for pb.Next() {
    			stackGrowthRecursive(rec)
    		}
    	})
    }
    
    func BenchmarkStackGrowth(b *testing.B) {
    	benchmarkStackGrowth(b, 10)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 25.8K bytes
    - Viewed (0)
  9. src/encoding/xml/xml_test.go

    <br>
    <br/><br/>
    <br><br>
    <br></br>
    <BR>
    <BR/><BR/>
    <Br></Br>
    <BR><span id="test">abc</span><br/><br/>`
    
    func BenchmarkHTMLAutoClose(b *testing.B) {
    	b.RunParallel(func(p *testing.PB) {
    		for p.Next() {
    			d := NewDecoder(strings.NewReader(testInputHTMLAutoClose))
    			d.Strict = false
    			d.AutoClose = HTMLAutoClose
    			d.Entity = HTMLEntity
    			for {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 36.9K bytes
    - Viewed (0)
  10. src/testing/testing.go

    //	}
    //
    // If a benchmark needs to test performance in a parallel setting, it may use
    // the RunParallel helper function; such benchmarks are intended to be used with
    // the go test -cpu flag:
    //
    //	func BenchmarkTemplateParallel(b *testing.B) {
    //	    templ := template.Must(template.New("test").Parse("Hello, {{.}}!"))
    //	    b.RunParallel(func(pb *testing.PB) {
    //	        var buf bytes.Buffer
    //	        for pb.Next() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 76.1K bytes
    - Viewed (0)
Back to top