- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for resetTimer (0.25 sec)
-
cmd/storage-datatypes_gen_test.go
v := BaseOptions{} b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { v.MarshalMsg(nil) } } func BenchmarkAppendMsgBaseOptions(b *testing.B) { v := BaseOptions{} bts := make([]byte, 0, v.Msgsize()) bts, _ = v.MarshalMsg(bts[0:0]) b.SetBytes(int64(len(bts))) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { bts, _ = v.MarshalMsg(bts[0:0]) } }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 15:51:27 UTC 2024 - 62.6K bytes - Viewed (0) -
internal/grid/benchmark_test.go
defer timeout(60 * time.Second)() ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() b.ReportAllocs() b.SetBytes(int64(len(payload) * 2)) b.ResetTimer() t := time.Now() var ops int64 var lat int64 b.SetParallelism(par) b.RunParallel(func(pb *testing.PB) { rng := rand.New(rand.NewSource(time.Now().UnixNano())) n := 0
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 15.7K bytes - Viewed (0) -
src/runtime/gc_test.go
} func BenchmarkReadMemStats(b *testing.B) { var ms runtime.MemStats const heapSize = 100 << 20 x := make([]*[1024]byte, heapSize/1024) for i := range x { x[i] = new([1024]byte) } b.ResetTimer() for i := 0; i < b.N; i++ { runtime.ReadMemStats(&ms) } runtime.KeepAlive(x) } func applyGCLoad(b *testing.B) func() { // We’ll apply load to the runtime with maxProcs-1 goroutines
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 05 22:33:52 UTC 2024 - 17.6K bytes - Viewed (0) -
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) -
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) -
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) -
staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go
b.Fatalf("parse selector: %v", err) } pred := storage.SelectionPredicate{ Label: labels.Everything(), Field: parsedField, } // now we start benchmarking b.ResetTimer() for i := 0; i < b.N; i++ { result := &example.PodList{} err = cacher.GetList(context.TODO(), "pods", storage.ListOptions{ Predicate: pred, Recursive: true,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 10:12:02 UTC 2024 - 82.9K bytes - Viewed (0) -
src/net/http/serve_test.go
}) } } mux := NewServeMux() for _, tt := range tests { mux.Handle(tt.path, serve(tt.code)) } rw := httptest.NewRecorder() b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { for _, tt := range tests { *rw = httptest.ResponseRecorder{} h, pattern := mux.Handler(tt.req) if runHandler { h.ServeHTTP(rw, tt.req)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 202K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go
if validator == nil { b.Fatal("expected non nil validator") } ctx := context.TODO() root := field.NewPath("root") b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { errs, _ := validator.Validate(ctx, root, s, obj, obj, celconfig.RuntimeCELCostBudget) for _, err := range errs { b.Errorf("unexpected error: %v", err) } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 17:14:10 UTC 2024 - 159.9K bytes - Viewed (0)