- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 40 for resetTime (0.18 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) -
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) -
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) -
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) -
staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_test.go
values[i].Format = BinarySI } b.ResetTimer() var s string for i := 0; i < b.N; i++ { q := values[i%len(values)] q.s = "" s = q.String() } b.StopTimer() if len(s) == 0 { b.Fatal(s) } } func BenchmarkQuantityMarshalJSON(b *testing.B) { values := benchmarkQuantities() b.ResetTimer() for i := 0; i < b.N; i++ { q := values[i%len(values)]
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:10 UTC 2024 - 49.4K 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)