- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for resetTime (0.32 sec)
-
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) -
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) -
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/gc_test.go
} func BenchmarkReadMemStats(b *testing.B) { var ms runtime.MemStats const heapSize = 100 << 20 x := make([]*[1024]byte, heapSize/1024) for i := range x { x[i] = new([1024]byte) } b.ResetTimer() for i := 0; i < b.N; i++ { runtime.ReadMemStats(&ms) } runtime.KeepAlive(x) } func applyGCLoad(b *testing.B) func() { // We’ll apply load to the runtime with maxProcs-1 goroutines
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 05 22:33:52 UTC 2024 - 17.6K bytes - Viewed (0) -
pkg/api/testing/unstructured_test.go
} } } func BenchmarkToUnstructured(b *testing.B) { items := benchmarkItems(b) size := len(items) convertor := runtime.DefaultUnstructuredConverter b.ResetTimer() for i := 0; i < b.N; i++ { unstr, err := convertor.ToUnstructured(&items[i%size]) if err != nil || unstr == nil { b.Fatalf("unexpected error: %v", err) } } b.StopTimer() }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:10 UTC 2024 - 16.9K bytes - Viewed (0) -
src/image/gif/writer_test.go
rnd := rand.New(rand.NewSource(123)) for i := range paletted.Pix { paletted.Pix[i] = uint8(rnd.Intn(256)) } b.SetBytes(640 * 480 * 1) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { Encode(io.Discard, paletted, nil) } } func BenchmarkEncodeRandomRGBA(b *testing.B) { rgba := image.NewRGBA(image.Rect(0, 0, 640, 480)) bo := rgba.Bounds()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 03 14:56:25 UTC 2024 - 19K bytes - Viewed (0) -
src/testing/benchmark.go
b.netBytes += memStats.TotalAlloc - b.startBytes b.timerOn = false } } // ResetTimer zeroes the elapsed benchmark time and memory allocation counters // and deletes user-reported metrics. // It does not affect whether the timer is running. func (b *B) ResetTimer() { if b.extra == nil { // Allocate the extra map before reading memory stats. // Pre-size it to make more allocation unlikely.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 23.9K bytes - Viewed (0) -
cmd/object-api-utils_test.go
} func BenchmarkPathJoinOld(b *testing.B) { b.Run("PathJoin", func(b *testing.B) { b.ResetTimer() b.ReportAllocs() for i := 0; i < b.N; i++ { pathJoinOld("volume", "path/path/path") } }) } func BenchmarkPathJoin(b *testing.B) { b.Run("PathJoin", func(b *testing.B) { b.ResetTimer() b.ReportAllocs() for i := 0; i < b.N; i++ { pathJoin("volume", "path/path/path") } })
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 23.4K bytes - Viewed (0) -
src/math/rand/rand_test.go
} }) } } func BenchmarkRead3(b *testing.B) { r := New(NewSource(1)) buf := make([]byte, 3) b.ResetTimer() for n := b.N; n > 0; n-- { r.Read(buf) } } func BenchmarkRead64(b *testing.B) { r := New(NewSource(1)) buf := make([]byte, 64) b.ResetTimer() for n := b.N; n > 0; n-- { r.Read(buf) } } func BenchmarkRead1000(b *testing.B) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 16.9K bytes - Viewed (0)