Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for resetTime (0.24 sec)

  1. 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)
  2. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_test.go

    		values[i].Format = BinarySI
    	}
    	b.ResetTimer()
    	var s string
    	for i := 0; i < b.N; i++ {
    		q := values[i%len(values)]
    		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)]
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 49.4K bytes
    - Viewed (0)
  3. src/math/big/int_test.go

    		}
    	}
    }
    
    func BenchmarkBitset(b *testing.B) {
    	z := new(Int)
    	z.SetBit(z, 512, 1)
    	b.ResetTimer()
    	for i := b.N - 1; i >= 0; i-- {
    		z.SetBit(z, i&512, 1)
    	}
    }
    
    func BenchmarkBitsetNeg(b *testing.B) {
    	z := NewInt(-1)
    	z.SetBit(z, 512, 0)
    	b.ResetTimer()
    	for i := b.N - 1; i >= 0; i-- {
    		z.SetBit(z, i&512, 0)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 58.5K bytes
    - Viewed (0)
  4. src/runtime/pprof/pprof_test.go

    	}
    
    	benchWriteTo := func(b *testing.B) {
    		goroutineProf := Lookup("goroutine")
    		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()
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 68.8K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/compilation_test.go

    func BenchmarkCompile(b *testing.B) {
    	env := environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), true) // prepare the environment
    	s := genArrayWithRule("number", "true")(nil)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		_, err := Compile(s, model.SchemaDeclType(s, false), math.MaxInt64, env, NewExpressionsEnvLoader())
    		if err != nil {
    			b.Fatal(err)
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 16 20:13:14 UTC 2024
    - 51.5K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiextensions-apiserver/test/integration/ratcheting_test.go

    			name = "RatchetingDisabled"
    		}
    		b.Run(name, func(b *testing.B) {
    			featuregatetesting.SetFeatureGateDuringTest(b, utilfeature.DefaultFeatureGate, features.CRDValidationRatcheting, ratchetingEnabled)
    			b.ResetTimer()
    
    			do := func(pairs []pair) {
    				for _, pair := range pairs {
    					// Create a validator for the GVK of the valid object.
    					validator, ok := validators[pair.old.GroupVersionKind()]
    					if !ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 59.5K bytes
    - Viewed (0)
  7. 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)
  8. src/os/os_test.go

    	benchmarkReadDir(".", b)
    }
    
    func benchmarkStat(b *testing.B, path string) {
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		_, err := Stat(path)
    		if err != nil {
    			b.Fatalf("Stat(%q) failed: %v", path, err)
    		}
    	}
    }
    
    func benchmarkLstat(b *testing.B, path string) {
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		_, err := Lstat(path)
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 83.1K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top