Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 263 for resetTime (0.42 sec)

  1. src/cmd/go/init_test.go

    func BenchmarkExecGoEnv(b *testing.B) {
    	testenv.MustHaveExec(b)
    	gotool, err := testenv.GoTool()
    	if err != nil {
    		b.Fatal(err)
    	}
    
    	// We collect extra metrics.
    	var n, userTime, systemTime int64
    
    	b.ResetTimer()
    	b.RunParallel(func(pb *testing.PB) {
    		for pb.Next() {
    			cmd := testenv.Command(b, gotool, "env", "GOARCH")
    
    			if err := cmd.Run(); err != nil {
    				b.Fatal(err)
    			}
    			atomic.AddInt64(&n, 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:21:26 UTC 2022
    - 1.1K bytes
    - Viewed (0)
  2. 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)
  3. internal/dsync/dsync_test.go

    func BenchmarkMutexUncontended(b *testing.B) {
    	b.ResetTimer()
    	b.ReportAllocs()
    
    	type PaddedMutex struct {
    		*DRWMutex
    	}
    	b.RunParallel(func(pb *testing.PB) {
    		mu := PaddedMutex{NewDRWMutex(ds, "")}
    		for pb.Next() {
    			mu.Lock(id, source)
    			mu.Unlock(context.Background())
    		}
    	})
    }
    
    func benchmarkMutex(b *testing.B, slack, work bool) {
    	b.ResetTimer()
    	b.ReportAllocs()
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat Dec 24 03:49:07 UTC 2022
    - 11K bytes
    - Viewed (0)
  4. 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)
  5. src/go/types/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:43 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. cmd/benchmark-utils_test.go

    	sha256hex := ""
    
    	// benchmark utility which helps obtain number of allocations and bytes allocated per ops.
    	b.ReportAllocs()
    	// the actual benchmark for PutObject starts here. Reset the benchmark timer.
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		// insert the object.
    		objInfo, err := obj.PutObject(context.Background(), bucket, "object"+strconv.Itoa(i),
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Dec 23 15:46:00 UTC 2022
    - 8.2K bytes
    - Viewed (0)
  9. 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)
  10. src/mime/type_test.go

    	initMime()
    	b.ResetTimer()
    
    	for _, ext := range []string{
    		".html",
    		".HTML",
    		".unused",
    	} {
    		b.Run(ext, func(b *testing.B) {
    			b.RunParallel(func(pb *testing.PB) {
    				for pb.Next() {
    					TypeByExtension(ext)
    				}
    			})
    		})
    	}
    }
    
    func BenchmarkExtensionsByType(b *testing.B) {
    	initMime()
    	b.ResetTimer()
    
    	for _, typ := range []string{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 08 21:09:03 UTC 2022
    - 4.9K bytes
    - Viewed (0)
Back to top