Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 40 for resetTime (0.3 sec)

  1. src/net/http/request_test.go

    	request = strings.ReplaceAll(request, "\n", "\r\n") // expand \n to \r\n
    	b.SetBytes(int64(len(request)))
    	r := bufio.NewReader(&infiniteReader{buf: []byte(request)})
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		_, err := ReadRequest(r)
    		if err != nil {
    			b.Fatalf("failed to read request: %v", err)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 18:42:34 UTC 2024
    - 44K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go

    						return nil, nil, fmt.Errorf("not a pod")
    					}
    					return pod.ObjectMeta.Labels, fields.Set{
    						"metadata.name": pod.Name,
    					}, nil
    				},
    			}
    
    			// now we start benchmarking
    			b.ResetTimer()
    			for i := 0; i < b.N; i++ {
    				list := tc.newListObjectFunc()
    				if err := store.GetList(ctx, dir, storage.ListOptions{Predicate: pred, Recursive: true}, list); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 12:45:33 UTC 2024
    - 26.5K bytes
    - Viewed (0)
  3. pkg/kube/inject/inject_test.go

    				Config:       sidecarTemplate,
    				meshConfig:   mc,
    				env:          env,
    				valuesConfig: valuesConfig,
    				revision:     "default",
    			}
    			templateJSON := convertToJSON(tt.in, b)
    			b.ResetTimer()
    			for n := 0; n < b.N; n++ {
    				webhook.inject(&kube.AdmissionReview{
    					Request: &kube.AdmissionRequest{
    						Object: runtime.RawExtension{
    							Raw: templateJSON,
    						},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 31 20:35:11 UTC 2024
    - 34.1K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_test.go

    	loadEventWithDuration(store, defaultUpperBoundCapacity, 0)
    	add := &watchCacheEvent{
    		Key:        fmt.Sprintf("event-%d", defaultUpperBoundCapacity),
    		RecordTime: store.clock.Now(),
    	}
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		store.updateCache(add)
    	}
    }
    
    func TestHistogramCacheReadWait(t *testing.T) {
    	registry := k8smetrics.NewKubeRegistry()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 35.4K bytes
    - Viewed (0)
  5. src/runtime/pprof/pprof_test.go

    	}
    
    	benchWriteTo := func(b *testing.B) {
    		goroutineProf := Lookup("goroutine")
    		b.ResetTimer()
    		for i := 0; i < b.N; i++ {
    			goroutineProf.WriteTo(io.Discard, 0)
    		}
    		b.StopTimer()
    	}
    
    	benchGoroutineProfile := func(b *testing.B) {
    		p := make([]runtime.StackRecord, 10000)
    		b.ResetTimer()
    		for i := 0; i < b.N; i++ {
    			runtime.GoroutineProfile(p)
    		}
    		b.StopTimer()
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 68.8K bytes
    - Viewed (0)
  6. pilot/cmd/pilot-agent/status/server_test.go

    	server := &Server{
    		registry: registry,
    		prometheus: &PrometheusScrapeConfiguration{
    			Port: strings.Split(app.URL, ":")[2],
    		},
    		envoyStatsPort: envoyPort,
    		http:           &http.Client{},
    	}
    	t.ResetTimer()
    	return server
    }
    
    func BenchmarkStats(t *testing.B) {
    	tests := map[int]string{
    		1:        "1kb",
    		1 << 10:  "1mb",
    		10 << 10: "10mb",
    	}
    	for size, v := range tests {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation_test.go

    func BenchmarkCompile(b *testing.B) {
    	env := environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), true) // prepare the environment
    	s := genArrayWithRule("number", "true")(nil)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		_, err := Compile(s, model.SchemaDeclType(s, false), math.MaxInt64, env, NewExpressionsEnvLoader())
    		if err != nil {
    			b.Fatal(err)
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 20:13:14 UTC 2024
    - 51.5K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiextensions-apiserver/test/integration/ratcheting_test.go

    			name = "RatchetingDisabled"
    		}
    		b.Run(name, func(b *testing.B) {
    			featuregatetesting.SetFeatureGateDuringTest(b, utilfeature.DefaultFeatureGate, features.CRDValidationRatcheting, ratchetingEnabled)
    			b.ResetTimer()
    
    			do := func(pairs []pair) {
    				for _, pair := range pairs {
    					// Create a validator for the GVK of the valid object.
    					validator, ok := validators[pair.old.GroupVersionKind()]
    					if !ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 59.5K bytes
    - Viewed (0)
  9. pkg/scheduler/framework/plugins/noderesources/fit_test.go

    			pl := plugintesting.SetupPlugin(ctx, b, nodeResourcesFunc, &test.nodeResourcesFitArgs, cache.NewSnapshot(existingPods, nodes))
    			p := pl.(*Fit)
    
    			b.ResetTimer()
    
    			requestedPod := st.MakePod().Req(map[v1.ResourceName]string{"cpu": "1000", "memory": "2000"}).Obj()
    			for i := 0; i < b.N; i++ {
    				_, status := p.Score(ctx, state, requestedPod, nodes[0].Name)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 57.4K bytes
    - Viewed (0)
  10. src/os/os_test.go

    	benchmarkReadDir(".", b)
    }
    
    func benchmarkStat(b *testing.B, path string) {
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		_, err := Stat(path)
    		if err != nil {
    			b.Fatalf("Stat(%q) failed: %v", path, err)
    		}
    	}
    }
    
    func benchmarkLstat(b *testing.B, path string) {
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		_, err := Lstat(path)
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 83.1K bytes
    - Viewed (0)
Back to top