- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 40 for resetTime (0.31 sec)
-
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) -
src/math/big/int_test.go
} } } func BenchmarkBitset(b *testing.B) { z := new(Int) z.SetBit(z, 512, 1) b.ResetTimer() for i := b.N - 1; i >= 0; i-- { z.SetBit(z, i&512, 1) } } func BenchmarkBitsetNeg(b *testing.B) { z := NewInt(-1) z.SetBit(z, 512, 0) b.ResetTimer() for i := b.N - 1; i >= 0; i-- { z.SetBit(z, i&512, 0) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 58.5K 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) -
src/net/http/cookie_test.go
Expires: time.Unix(1257894000, 0), Path: "/restricted/", Domain: ".example.com", MaxAge: 3600, } var benchmarkCookieString string b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { benchmarkCookieString = c.String() } if have, want := benchmarkCookieString, wantCookieString; have != want { b.Fatalf("Have: %v Want: %v", have, want) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 18:33:05 UTC 2024 - 26.2K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/values_test.go
"val": 1, }, map[string]interface{}{ "key": "b", "val": 2, }, map[string]interface{}{ "key": "@b", "val": 2, }, } b.ReportAllocs() b.ResetTimer() for n := 0; n < b.N; n++ { if val := UnstructuredToVal(u, &mapListSchema); val == nil { b.Fatal(val) } } } func BenchmarkUnstructuredToValWithEscape(b *testing.B) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 16 20:13:14 UTC 2024 - 17.3K bytes - Viewed (0) -
src/log/slog/value_test.go
b.ReportAllocs() dst := make([]Value, 100) src := make([]Value, len(dst)) b.Logf("Value size = %d", unsafe.Sizeof(Value{})) for i := range src { src[i] = StringValue(fmt.Sprintf("string#%d", i)) } b.ResetTimer() var d string for i := 0; i < b.N; i++ { copy(dst, src) for _, a := range dst { d = a.String() } } _ = d
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 16:12:08 UTC 2024 - 6.9K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/model/schemas_test.go
return nodeTemplate } } schema := generator(depth) return &schema } func BenchmarkDeeplyNestedSchemaDeclType(b *testing.B) { benchmarkSchema := genNestedSchema(10) b.ResetTimer() for i := 0; i < b.N; i++ { SchemaDeclType(benchmarkSchema, false) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 16 20:13:14 UTC 2024 - 14K bytes - Viewed (0) -
src/runtime/runtime_test.go
} } } func BenchmarkGoroutineProfile(b *testing.B) { run := func(fn func() bool) func(b *testing.B) { runOne := func(b *testing.B) { latencies := make([]time.Duration, 0, b.N) b.ResetTimer() for i := 0; i < b.N; i++ { start := time.Now() ok := fn() if !ok { b.Fatal("goroutine profile failed") } latencies = append(latencies, time.Since(start)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 11.7K bytes - Viewed (0) -
src/hash/crc32/crc32_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 03 14:56:25 UTC 2024 - 12.1K bytes - Viewed (0)