Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 66 for resetTime (0.23 sec)

  1. src/internal/trace/gc.go

    	// windowed mutator utilization function.
    	lastTime int64
    	lastMU   float64
    }
    
    // resetTime declares a discontinuity in the windowed mutator
    // utilization function by resetting the current time.
    func (acc *accumulator) resetTime() {
    	// This only matters for distribution collection, since that's
    	// the only thing that depends on the progression of the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 26K bytes
    - Viewed (0)
  2. internal/ringbuffer/ring_buffer_benchmark_test.go

    			rb.Read(buf)
    		}
    	}()
    
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		rb.Write(data)
    	}
    }
    
    func BenchmarkRingBuffer_AsyncWrite(b *testing.B) {
    	rb := New(1024)
    	data := []byte(strings.Repeat("a", 512))
    	buf := make([]byte, 512)
    
    	go func() {
    		for {
    			rb.Write(data)
    		}
    	}()
    
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		rb.Read(buf)
    	}
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  3. 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)
  4. src/encoding/binary/binary_test.go

    	b.SetBytes(int64(len(buf)))
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		bsr.remain = buf
    		Read(bsr, BigEndian, slice)
    	}
    }
    
    func BenchmarkReadStruct(b *testing.B) {
    	bsr := &byteSliceReader{}
    	var buf bytes.Buffer
    	Write(&buf, BigEndian, &s)
    	b.SetBytes(int64(dataSize(reflect.ValueOf(s))))
    	t := s
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		bsr.remain = buf.Bytes()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:16:18 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  5. cmd/jwt_test.go

    	}
    
    	creds := globalActiveCred
    	b.Run("uncached", func(b *testing.B) {
    		fn := authenticateNode
    		b.ResetTimer()
    		b.ReportAllocs()
    		for i := 0; i < b.N; i++ {
    			fn(creds.AccessKey, creds.SecretKey, "aud")
    		}
    	})
    	b.Run("cached", func(b *testing.B) {
    		fn := newCachedAuthToken()
    		b.ResetTimer()
    		b.ReportAllocs()
    		for i := 0; i < b.N; i++ {
    			fn("aud")
    		}
    	})
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Apr 19 16:45:14 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  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/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)
Back to top