Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 168 for resetTimer (0.33 sec)

  1. pkg/test/loadbalancersim/timer/queue.go

    		resetTimerCh: make(chan struct{}),
    	}
    
    	// Start the worker thread.
    	go func() {
    		for {
    			select {
    			case <-q.stopCh:
    				q.stopTimer()
    				return
    			case <-q.resetTimerCh:
    				q.resetTimer()
    			case <-q.timer.C:
    				q.onTimerExpired()
    			}
    		}
    	}()
    
    	return q
    }
    
    func (q *Queue) Len() int {
    	q.mutex.Lock()
    	defer q.mutex.Unlock()
    	return q.heap.Len()
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jul 20 19:13:32 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/passbm_test.go

    	CheckFunc(fun.f)
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		fn(fun.f)
    		b.StopTimer()
    		CheckFunc(fun.f)
    		b.StartTimer()
    	}
    }
    
    // benchFnBlock runs passFunc across a function with b.N blocks.
    func benchFnBlock(b *testing.B, fn passFunc, bg blockGen) {
    	b.ReportAllocs()
    	c := testConfig(b)
    	fun := c.Fun("entry", bg(b.N)...)
    	CheckFunc(fun.f)
    	b.ResetTimer()
    	for i := 0; i < passCount; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  3. src/crypto/internal/bigmod/nat_test.go

    	x := makeBenchmarkValue()
    	y := makeBenchmarkValue()
    	m := makeBenchmarkModulus()
    
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		x.Add(y, m)
    	}
    }
    
    func BenchmarkModSub(b *testing.B) {
    	x := makeBenchmarkValue()
    	y := makeBenchmarkValue()
    	m := makeBenchmarkModulus()
    
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		x.Sub(y, m)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 12 00:56:20 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  4. pkg/api/testing/serialization_test.go

    // reflection (to clear APIVersion and Kind)
    func BenchmarkEncodeCodec(b *testing.B) {
    	items := benchmarkItems(b)
    	width := len(items)
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		if _, err := runtime.Encode(legacyscheme.Codecs.LegacyCodec(v1.SchemeGroupVersion), &items[i%width]); err != nil {
    			b.Fatal(err)
    		}
    	}
    	b.StopTimer()
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 25 11:04:08 UTC 2023
    - 19.3K bytes
    - Viewed (0)
  5. src/unique/handle_bench_test.go

    }
    
    func benchmarkMake(b *testing.B, testData []string) {
    	handles := make([]Handle[string], 0, len(testData))
    	for i := range testData {
    		handles = append(handles, Make(testData[i]))
    	}
    
    	b.ReportAllocs()
    	b.ResetTimer()
    
    	b.RunParallel(func(pb *testing.PB) {
    		i := 0
    		for pb.Next() {
    			_ = Make(testData[i])
    			i++
    			if i >= len(testData) {
    				i = 0
    			}
    		}
    	})
    
    	b.StopTimer()
    
    	runtime.GC()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 18:14:07 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  6. internal/grid/types_test.go

    	v := MSS{"abc": "def", "ghi": "jkl"}
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.MarshalMsg(nil)
    	}
    }
    
    func BenchmarkAppendMsgMSS(b *testing.B) {
    	v := MSS{"abc": "def", "ghi": "jkl"}
    	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: Tue Nov 21 01:09:35 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  7. src/cmd/go/internal/cfg/bench_test.go

    // license that can be found in the LICENSE file.
    
    package cfg
    
    import (
    	"internal/testenv"
    	"testing"
    )
    
    func BenchmarkLookPath(b *testing.B) {
    	testenv.MustHaveExecPath(b, "go")
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		_, err := LookPath("go")
    		if err != nil {
    			b.Fatal(err)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 11 20:12:18 UTC 2023
    - 404 bytes
    - Viewed (0)
  8. cmd/xl-storage-format_test.go

    			}
    			b.Logf("Serialized size: %d bytes", len(enc))
    			rng := rand.New(rand.NewSource(0))
    			dump := make([]byte, len(enc))
    			b.Run("UpdateObjectVersion", func(b *testing.B) {
    				b.SetBytes(int64(size))
    				b.ResetTimer()
    				b.ReportAllocs()
    				for i := 0; i < b.N; i++ {
    					// Load...
    					xl = xlMetaV2{}
    					err := xl.Load(enc)
    					if err != nil {
    						b.Fatal(err)
    					}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Feb 22 06:26:06 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  9. pkg/config/analysis/analyzers/analyzers_bench_test.go

    		b.Run(tc.name+"-bench", func(b *testing.B) {
    			sa, err := setupAnalyzerForCase(tc, nil)
    			if err != nil {
    				b.Fatalf("Error setting up analysis for benchmark on testcase %s: %v", tc.name, err)
    			}
    
    			b.ResetTimer()
    
    			// Run the analysis
    			_, err = runAnalyzer(sa)
    			if err != nil {
    				b.Fatalf("Error running analysis for benchmark on testcase %s: %v", tc.name, err)
    			}
    		})
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 02 08:32:06 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  10. 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)
Back to top