Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 263 for resetTime (0.13 sec)

  1. pkg/api/testing/conversion_test.go

    		b.Fatalf("Unexpected error decoding node: %v", err)
    	}
    
    	scheme := legacyscheme.Scheme
    	var result *api.Node
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		versionedObj, err := scheme.UnsafeConvertToVersion(&node, schema.GroupVersion{Group: "", Version: "v1"})
    		if err != nil {
    			b.Fatalf("Conversion error: %v", err)
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 30 06:49:09 UTC 2021
    - 3.9K bytes
    - Viewed (0)
  2. pilot/pkg/config/memory/store_test.go

    }
    
    func BenchmarkStoreGet(b *testing.B) {
    	s := initStore(b)
    	gvk := config.GroupVersionKind{
    		Group:   "networking.istio.io",
    		Version: "v1alpha3",
    		Kind:    "ServiceEntry",
    	}
    	b.ResetTimer()
    	for n := 0; n < b.N; n++ {
    		// get one thousand times
    		for i := 0; i < 1000; i++ {
    			if s.Get(gvk, strconv.Itoa(i), "ns") == nil {
    				b.Fatal("get failed")
    			}
    		}
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Dec 26 01:14:27 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/managedfields/internal/fields_test.go

    		fieldpath.MakePathOrDie("qux", fieldpath.KeyByFields("name", "first"), "bar"),
    		fieldpath.MakePathOrDie("qux", fieldpath.KeyByFields("name", "second"), "bar"),
    	)
    
    	b.ReportAllocs()
    	b.ResetTimer()
    	for n := 0; n < b.N; n++ {
    		_, err := SetToFields(*set)
    		if err != nil {
    			b.Fatal(err)
    		}
    	}
    }
    
    func BenchmarkFieldsToSet(b *testing.B) {
    	set := fieldpath.NewSet(
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 21:44:00 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  4. src/context/benchmark_test.go

    	"sync"
    	"testing"
    	"time"
    )
    
    func BenchmarkCommonParentCancel(b *testing.B) {
    	root := WithValue(Background(), "key", "value")
    	shared, sharedcancel := WithCancel(root)
    	defer sharedcancel()
    
    	b.ResetTimer()
    	b.RunParallel(func(pb *testing.PB) {
    		x := 0
    		for pb.Next() {
    			ctx, cancel := WithCancel(shared)
    			if ctx.Value("key").(string) != "value" {
    				b.Fatal("should not be reached")
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Oct 02 00:44:24 UTC 2021
    - 3.8K bytes
    - Viewed (0)
  5. src/expvar/expvar_test.go

    	for i := range procKeys {
    		keys := make([]string, 4)
    		for j := range keys {
    			keys[j] = fmt.Sprint(i, j)
    		}
    		procKeys[i] = keys
    	}
    
    	m := new(Map).Init()
    	v := new(Int)
    	b.ResetTimer()
    
    	var n int32
    	b.RunParallel(func(pb *testing.PB) {
    		i := int(atomic.AddInt32(&n, 1)-1) % len(procKeys)
    		keys := procKeys[i]
    
    		for pb.Next() {
    			for _, k := range keys {
    				m.Set(k, v)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:46:19 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/lookup_test.go

    			typ := scope.Lookup(name).Type()
    			LookupFieldOrMethod(typ, true, pkg, "m")
    		}
    	}
    
    	// Perform a lookup once, to ensure that any lazily-evaluated state is
    	// complete.
    	lookup()
    
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		lookup()
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 13 15:31:35 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/api/meta/help_test.go

    		},
    		{
    			name: "RawExtensionList",
    			list: fakeExtensionList(fakeObjectItemsNum),
    		},
    	}
    	for _, tc := range tests {
    		b.Run(tc.name, func(b *testing.B) {
    			b.ResetTimer()
    			for i := 0; i < b.N; i++ {
    				_, err := ExtractList(tc.list)
    				if err != nil {
    					b.Fatalf("ExtractList: %v", err)
    				}
    			}
    			b.StopTimer()
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 29 13:40:46 UTC 2023
    - 12.1K bytes
    - Viewed (0)
  8. src/go/doc/testdata/testing.0.golden

    	func (c *B) Log(args ...any)
    
    	// Logf formats its arguments according to the format, analogous ...
    	func (c *B) Logf(format string, args ...any)
    
    	// ResetTimer sets the elapsed benchmark time to zero. It does not ...
    	func (b *B) ResetTimer()
    
    	// SetBytes records the number of bytes processed in a single ...
    	func (b *B) SetBytes(n int64)
    
    	// StartTimer starts timing a test. This function is called ...
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 4.1K bytes
    - Viewed (0)
  9. src/go/doc/testdata/testing.2.golden

    	func (c *B) Log(args ...any)
    
    	// Logf formats its arguments according to the format, analogous ...
    	func (c *B) Logf(format string, args ...any)
    
    	// ResetTimer sets the elapsed benchmark time to zero. It does not ...
    	func (b *B) ResetTimer()
    
    	// SetBytes records the number of bytes processed in a single ...
    	func (b *B) SetBytes(n int64)
    
    	// StartTimer starts timing a test. This function is called ...
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 4.1K bytes
    - Viewed (0)
  10. src/go/types/named_test.go

    				_ = test.typ.Underlying()
    				b.ResetTimer()
    				for i := 0; i < b.N; i++ {
    					_ = test.typ.Underlying()
    				}
    			})
    		}
    	})
    
    	b.Run("NewMethodSet", func(b *testing.B) {
    		for _, test := range tests {
    			b.Run(test.name, func(b *testing.B) {
    				// Access underlying once, to trigger any lazy calculation.
    				_ = NewMethodSet(test.typ)
    				b.ResetTimer()
    				for i := 0; i < b.N; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 05 16:29:58 UTC 2024
    - 3.9K bytes
    - Viewed (0)
Back to top