Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 40 for resetTime (0.32 sec)

  1. src/crypto/x509/x509_test.go

    				if err != nil {
    					b.Fatalf("failed to generate test key: %s", err)
    				}
    				return k
    			},
    		},
    	}
    
    	for _, tc := range tests {
    		k := tc.gen()
    		b.ResetTimer()
    		b.Run(tc.name, func(b *testing.B) {
    			for i := 0; i < b.N; i++ {
    				_, err := CreateCertificate(rand.Reader, template, template, k.Public(), k)
    				if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:00:16 UTC 2024
    - 163.4K bytes
    - Viewed (0)
  2. src/runtime/metrics_test.go

    	stop := applyGCLoad(b)
    
    	// Spend this much time measuring latencies.
    	latencies := make([]time.Duration, 0, 1024)
    	_, samples := prepareAllMetricsSamples()
    
    	// Hit metrics.Read continuously and measure.
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		start := time.Now()
    		metrics.Read(samples)
    		latencies = append(latencies, time.Since(start))
    	}
    	// Make sure to stop the timer before we wait! The load created above
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 45K bytes
    - Viewed (0)
  3. src/runtime/export_test.go

    	c.revise()
    }
    
    func (c *GCController) EndCycle(bytesMarked uint64, assistTime, elapsed int64, gomaxprocs int) {
    	c.assistTime.Store(assistTime)
    	c.endCycle(elapsed, gomaxprocs, false)
    	c.resetLive(bytesMarked)
    	c.commit(false)
    }
    
    func (c *GCController) AddIdleMarkWorker() bool {
    	return c.addIdleMarkWorker()
    }
    
    func (c *GCController) NeedIdleMarkWorker() bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
  4. src/crypto/tls/handshake_server_test.go

    				}
    				if !bytes.Equal(f, ff) {
    					b.Errorf("#%d: mismatch on read: got:%x want:%x", i+1, ff, f)
    				}
    			}
    		}
    	}()
    
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		feeder <- struct{}{}
    		server := Server(serverConn, config)
    		if err := server.Handshake(); err != nil {
    			b.Fatalf("handshake failed: %v", err)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 64.7K bytes
    - Viewed (0)
  5. src/runtime/mgc.go

    	for _, p := range allp {
    		c := p.mcache
    		if c == nil {
    			continue
    		}
    		c.scanAlloc = 0
    	}
    
    	// Reset controller state.
    	gcController.resetLive(work.bytesMarked)
    }
    
    // gcSweep must be called on the system stack because it acquires the heap
    // lock. See mheap for details.
    //
    // Returns true if the heap was fully swept by this function.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 62K bytes
    - Viewed (0)
  6. 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)
  7. pilot/pkg/serviceregistry/serviceentry/controller_test.go

    		temp := model.Service{
    			Hostname:       host.Name(fmt.Sprintf("foo%d.com", i)),
    			Resolution:     model.ClientSideLB,
    			DefaultAddress: constants.UnspecifiedIP,
    		}
    		inServices[i] = &temp
    	}
    	t.ResetTimer()
    	for i := 0; i < t.N; i++ {
    		autoAllocateIPs(inServices)
    	}
    }
    
    // Validate that ipaddress allocation is deterministic based on hash.
    func Test_autoAllocateIP_deterministic(t *testing.T) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 15:31:09 UTC 2024
    - 92.9K bytes
    - Viewed (0)
  8. src/testing/testing.go

    //
    // If a benchmark needs some expensive setup before running, the timer
    // may be reset:
    //
    //	func BenchmarkBigLen(b *testing.B) {
    //	    big := NewBig()
    //	    b.ResetTimer()
    //	    for range b.N {
    //	        big.Len()
    //	    }
    //	}
    //
    // If a benchmark needs to test performance in a parallel setting, it may use
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 76.1K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top