Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for stopTimer (0.19 sec)

  1. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_test.go

    		q.s = ""
    		s = q.String()
    	}
    	b.StopTimer()
    	if len(s) == 0 {
    		b.Fatal(s)
    	}
    }
    
    func BenchmarkQuantityMarshalJSON(b *testing.B) {
    	values := benchmarkQuantities()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		q := values[i%len(values)]
    		q.s = ""
    		if _, err := q.MarshalJSON(); err != nil {
    			b.Fatal(err)
    		}
    	}
    	b.StopTimer()
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 49.4K bytes
    - Viewed (0)
  2. src/net/url/url_test.go

    func BenchmarkString(b *testing.B) {
    	b.StopTimer()
    	b.ReportAllocs()
    	for _, tt := range urltests {
    		u, err := Parse(tt.in)
    		if err != nil {
    			b.Errorf("Parse(%q) returned error %s", tt.in, err)
    			continue
    		}
    		if tt.roundtrip == "" {
    			continue
    		}
    		b.StartTimer()
    		var g string
    		for i := 0; i < b.N; i++ {
    			g = u.String()
    		}
    		b.StopTimer()
    		if w := tt.roundtrip; b.N > 0 && g != w {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:52:38 UTC 2024
    - 52.1K bytes
    - Viewed (0)
  3. src/runtime/pprof/pprof_test.go

    		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()
    	}
    
    	// Note that some costs of collecting a goroutine profile depend on the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 68.8K bytes
    - Viewed (0)
  4. pkg/scheduler/internal/cache/cache_test.go

    			benchmarkExpire(b, podNum)
    		})
    	}
    }
    
    func benchmarkExpire(b *testing.B, podNum int) {
    	logger, _ := ktesting.NewTestContext(b)
    	now := time.Now()
    	for n := 0; n < b.N; n++ {
    		b.StopTimer()
    		cache := setupCacheWithAssumedPods(b, podNum, now)
    		b.StartTimer()
    		cache.cleanupAssumedPods(logger, now.Add(2*time.Second))
    	}
    }
    
    type testingMode interface {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 17 01:38:03 UTC 2023
    - 63.8K bytes
    - Viewed (0)
  5. pkg/kubelet/cm/devicemanager/manager_test.go

    	as.NotContains(testManager.endpoints, resourceName1)
    	as.Equal(1, len(testManager.endpoints))
    
    	// Stops resourceName2 endpoint. Verifies its stopTime is set, allocate and
    	// preStartContainer calls return errors.
    	e2.client.Disconnect()
    	as.False(e2.stopTime.IsZero())
    	_, err = e2.allocate([]string{"Device1"})
    	reflect.DeepEqual(err, fmt.Errorf(errEndpointStopped, e2))
    	_, err = e2.preStartContainer([]string{"Device1"})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 65K bytes
    - Viewed (0)
Back to top