Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 263 for resetTime (0.16 sec)

  1. staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/secretbox/secretbox_test.go

    			value.PrefixTransformer{Prefix: []byte("second:"), Transformer: NewSecretboxTransformer(key2)},
    			value.PrefixTransformer{Prefix: []byte("first:"), Transformer: NewSecretboxTransformer(key1)},
    		)
    	}
    
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		from, stale, err := p.TransformFromStorage(ctx, out, dataCtx)
    		if err != nil {
    			b.Fatal(err)
    		}
    		if expectStale != stale {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 17 16:31:31 UTC 2022
    - 6.8K bytes
    - Viewed (0)
  2. src/go/format/benchmark_test.go

    			if err != nil {
    				b.Fatalf("couldn't write %s: %v", filename, err)
    			}
    		}
    
    		b.Run(fmt.Sprintf("%s-%d", t.name, t.n), func(b *testing.B) {
    			b.SetBytes(int64(len(data)))
    			b.ReportAllocs()
    			b.ResetTimer()
    			for i := 0; i < b.N; i++ {
    				var err error
    				sink, err = format.Source(data)
    				if err != nil {
    					b.Fatal(err)
    				}
    			}
    		})
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 2K bytes
    - Viewed (0)
  3. cmd/erasure-sets_test.go

    		{256},
    		{512},
    		{1024},
    	}
    	for _, testCase := range cases {
    		testCase := testCase
    		key := randString(testCase.key)
    		b.Run("", func(b *testing.B) {
    			b.SetBytes(1024)
    			b.ReportAllocs()
    			b.ResetTimer()
    			for i := 0; i < b.N; i++ {
    				crcHashMod(key, 16)
    			}
    		})
    	}
    }
    
    func BenchmarkSipHash(b *testing.B) {
    	cases := []struct {
    		key int
    	}{
    		{16},
    		{64},
    		{128},
    		{256},
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Feb 12 07:21:56 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  4. 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)
  5. src/html/template/css_test.go

    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		decodeCSS(s)
    	}
    }
    
    func BenchmarkDecodeCSSNoSpecials(b *testing.B) {
    	s := []byte("The quick, brown fox jumps over the lazy dog.")
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		decodeCSS(s)
    	}
    }
    
    func BenchmarkCSSValueFilter(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 02 19:38:18 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  6. pkg/api/testing/applyconfiguration_test.go

    		item, err := convertor.ToUnstructured(&items[i])
    		if err != nil || item == nil {
    			b.Fatalf("unexpected error: %v", err)
    		}
    		unstr = append(unstr, item)
    	}
    	size := len(items)
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		builder := &v1mf.PodApplyConfiguration{}
    		if err := runtime.DefaultUnstructuredConverter.FromUnstructured(unstr[i%size], builder); err != nil {
    			b.Fatalf("unexpected error: %v", err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 05 20:12:50 UTC 2022
    - 7.3K bytes
    - Viewed (0)
  7. src/image/jpeg/writer_test.go

    			img.SetRGBA(x, y, color.RGBA{
    				uint8(rnd.Intn(256)),
    				uint8(rnd.Intn(256)),
    				uint8(rnd.Intn(256)),
    				255,
    			})
    		}
    	}
    	b.SetBytes(640 * 480 * 4)
    	b.ReportAllocs()
    	b.ResetTimer()
    	options := &Options{Quality: 90}
    	for i := 0; i < b.N; i++ {
    		Encode(io.Discard, img, options)
    	}
    }
    
    func BenchmarkEncodeYCbCr(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 15:49:30 UTC 2022
    - 7.2K bytes
    - Viewed (0)
  8. src/crypto/rsa/rsa_test.go

    			b.Fatal(err)
    		}
    
    		b.ResetTimer()
    		for i := 0; i < b.N; i++ {
    			err := VerifyPKCS1v15(&test2048Key.PublicKey, crypto.SHA256, hashed[:], s)
    			if err != nil {
    				b.Fatal(err)
    			}
    		}
    	})
    }
    
    func BenchmarkSignPSS(b *testing.B) {
    	b.Run("2048", func(b *testing.B) {
    		hashed := sha256.Sum256([]byte("testing"))
    
    		var sink byte
    		b.ResetTimer()
    		for i := 0; i < b.N; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 12 00:55:41 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  9. pkg/api/testing/unstructured_test.go

    		}
    	}
    }
    
    func BenchmarkToUnstructured(b *testing.B) {
    	items := benchmarkItems(b)
    	size := len(items)
    	convertor := runtime.DefaultUnstructuredConverter
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		unstr, err := convertor.ToUnstructured(&items[i%size])
    		if err != nil || unstr == nil {
    			b.Fatalf("unexpected error: %v", err)
    		}
    	}
    	b.StopTimer()
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  10. src/crypto/internal/mlkem768/mlkem768_test.go

    		t.Errorf("got %s, expected %s", got, expected)
    	}
    }
    
    var sink byte
    
    func BenchmarkKeyGen(b *testing.B) {
    	var dk DecapsulationKey
    	var d, z [32]byte
    	rand.Read(d[:])
    	rand.Read(z[:])
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		dk := kemKeyGen(&dk, &d, &z)
    		sink ^= dk.EncapsulationKey()[0]
    	}
    }
    
    func BenchmarkEncaps(b *testing.B) {
    	d := make([]byte, 32)
    	rand.Read(d)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 15:27:18 UTC 2024
    - 10.3K bytes
    - Viewed (0)
Back to top