- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 164 for resetTimer (0.17 sec)
-
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) -
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) -
src/internal/concurrent/hashtriemap_bench_test.go
} func benchmarkHashTrieMapLoad(b *testing.B, data []string) { b.ReportAllocs() m := NewHashTrieMap[string, int]() for i := range data { m.LoadOrStore(data[i], i) } b.ResetTimer() b.RunParallel(func(pb *testing.PB) { i := 0 for pb.Next() { _, _ = m.Load(data[i]) i++ if i >= len(data) { i = 0 } } }) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 21:20:09 UTC 2024 - 1.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/environment/base_test.go
ver := DefaultCompatibilityVersion() MustBaseEnvSet(ver, true) b.ResetTimer() for i := 0; i < b.N; i++ { MustBaseEnvSet(ver, true) } } // BenchmarkLoadBaseEnvDifferentVersions is expected to be relatively slow, because a // a new environment must be created for each MustBaseEnvSet call. func BenchmarkLoadBaseEnvDifferentVersions(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 10 22:07:40 UTC 2024 - 4.7K bytes - Viewed (0) -
src/sort/sort_slices_benchmark_test.go
slices.Sort(ss) } } func BenchmarkSortStrings_Sorted(b *testing.B) { ss := makeSortedStrings(N) b.ResetTimer() for i := 0; i < b.N; i++ { Sort(StringSlice(ss)) } } func BenchmarkSlicesSortStrings_Sorted(b *testing.B) { ss := makeSortedStrings(N) b.ResetTimer() for i := 0; i < b.N; i++ { slices.Sort(ss) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 08 22:59:40 UTC 2024 - 4K bytes - Viewed (0) -
pkg/util/sets/set_test.go
set1 := New[string]() for i := 0; i < 1000; i++ { set1.Insert(fmt.Sprint(i)) } set2 := New[string]() for i := 0; i < 50; i++ { set2.Insert(fmt.Sprint(i)) } b.ResetTimer() b.Run("SupersetOf", func(b *testing.B) { for n := 0; n < b.N; n++ { set1.SupersetOf(set2) } }) } func TestEquals(t *testing.T) { tests := []struct { name string
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sat Mar 30 05:26:03 UTC 2024 - 7.9K bytes - Viewed (0) -
internal/grid/benchmark_test.go
defer timeout(60 * time.Second)() ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() b.ReportAllocs() b.SetBytes(int64(len(payload) * 2)) b.ResetTimer() t := time.Now() var ops int64 var lat int64 b.SetParallelism(par) b.RunParallel(func(pb *testing.PB) { rng := rand.New(rand.NewSource(time.Now().UnixNano())) n := 0
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 15.7K bytes - Viewed (0) -
src/runtime/map_test.go
func benchmarkMapAppendAssignInt32(b *testing.B, n int) { a := make(map[int32][]int) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { key := int32(i & (n - 1)) a[key] = append(a[key], i) } } func benchmarkMapDeleteInt32(b *testing.B, n int) { a := make(map[int32]int, n) b.ResetTimer() for i := 0; i < b.N; i++ { if len(a) == 0 { b.StopTimer() for j := i; j < i+n; j++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 33.5K bytes - Viewed (0) -
src/runtime/callers_test.go
if n <= 0 { pcs := make([]uintptr, 32) b.ResetTimer() for i := 0; i < b.N; i++ { runtime.Callers(0, pcs) } b.StopTimer() return 0 } return 1 + callersCached(b, n-1) } func callersInlined(b *testing.B, n int) int { if n <= 0 { pcs := make([]uintptr, 32) b.ResetTimer() for i := 0; i < b.N; i++ { runtime.Callers(0, pcs) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 28 21:36:31 UTC 2023 - 12.1K bytes - Viewed (0) -
pilot/pkg/xds/bench_test.go
} func BenchmarkInitPushContext(b *testing.B) { configureBenchmark(b) for _, tt := range testCases { b.Run(tt.Name, func(b *testing.B) { s, proxy := setupTest(b, tt) b.ResetTimer() for n := 0; n < b.N; n++ { s.Env().PushContext().InitDone.Store(false) initPushContext(s.Env(), proxy) } }) } } func BenchmarkRouteGeneration(b *testing.B) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 22 18:13:40 UTC 2024 - 19.7K bytes - Viewed (0)