- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 94 for stopTimer (0.16 sec)
-
src/net/url/url_test.go
func BenchmarkString(b *testing.B) { b.StopTimer() b.ReportAllocs() for _, tt := range urltests { u, err := Parse(tt.in) if err != nil { b.Errorf("Parse(%q) returned error %s", tt.in, err) continue } if tt.roundtrip == "" { continue } b.StartTimer() var g string for i := 0; i < b.N; i++ { g = u.String() } b.StopTimer() if w := tt.roundtrip; b.N > 0 && g != w {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 22:52:38 UTC 2024 - 52.1K bytes - Viewed (0) -
pkg/util/sets/set_test.go
} } }) b.Run("contains", func(b *testing.B) { for n := 0; n < b.N; n++ { containsTest.Contains("100") } }) b.Run("sorted", func(b *testing.B) { for n := 0; n < b.N; n++ { b.StopTimer() s := New(sortOrder...) b.StartTimer() SortedList(s) } }) } func TestMapOfSet(t *testing.T) { m := map[int]String{} InsertOrNew(m, 1, "a") InsertOrNew(m, 1, "b")
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sat Mar 30 05:26:03 UTC 2024 - 7.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/watch/mux_test.go
m := NewBroadcaster(0, WaitIfChannelFull) b.ResetTimer() b.RunParallel(func(pb *testing.PB) { for pb.Next() { m.Action(event1.Type, event1.Object) } }) b.StopTimer() } func TestBroadcasterWatchAfterShutdown(t *testing.T) { event1 := Event{Type: Added, Object: &myType{"foo", "hello world 1"}} event2 := Event{Type: Added, Object: &myType{"bar", "hello world 2"}}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 16 15:26:25 UTC 2022 - 8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/envelope_test.go
from, stale, err := transformer.TransformFromStorage(ctx, out, dataCtx) if err != nil { b.Fatal(err) } if stale { b.Fatalf("unexpected data: %t %q", stale, from) } } b.StopTimer() } // remove after 1.13 func TestBackwardsCompatibility(t *testing.T) { envelopeService := newTestEnvelopeService() cbcTransformer := func(block cipher.Block) (value.Transformer, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 14 14:23:50 UTC 2023 - 10.1K bytes - Viewed (0) -
src/reflect/benchmark_test.go
type S struct { i1 int64 i2 int64 } func BenchmarkInterfaceBig(b *testing.B) { v := ValueOf(S{}) b.RunParallel(func(pb *testing.PB) { for pb.Next() { v.Interface() } }) b.StopTimer() } func BenchmarkInterfaceSmall(b *testing.B) { v := ValueOf(int64(0)) b.RunParallel(func(pb *testing.PB) { for pb.Next() { v.Interface() } }) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Nov 19 17:09:03 UTC 2023 - 8.8K bytes - Viewed (0) -
src/runtime/time.go
throw("invalid timer channel: no capacity") } } t.modify(when, period, f, arg, 0) t.init = true return t } // stopTimer stops a timer. // It reports whether t was stopped before being run. // //go:linkname stopTimer time.stopTimer func stopTimer(t *timeTimer) bool { return t.stop() } // resetTimer resets an inactive timer, adding it to the timer heap. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 29 14:36:24 UTC 2024 - 37.5K bytes - Viewed (0) -
src/image/jpeg/dct_test.go
// license that can be found in the LICENSE file. package jpeg import ( "fmt" "math" "math/rand" "strings" "testing" ) func benchmarkDCT(b *testing.B, f func(*block)) { b.StopTimer() blocks := make([]block, 0, b.N*len(testBlocks)) for i := 0; i < b.N; i++ { blocks = append(blocks, testBlocks[:]...) } b.StartTimer() for i := range blocks { f(&blocks[i]) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 06 15:49:30 UTC 2022 - 8.6K bytes - Viewed (0) -
pkg/api/testing/defaulting_test.go
for i := range items { f.Fuzz(&items[i]) } scheme := legacyscheme.Scheme b.ResetTimer() for i := 0; i < b.N; i++ { pod := &items[i%len(items)] scheme.Default(pod) } b.StopTimer()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 06 00:00:21 UTC 2024 - 20.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/watch_test.go
b.ResetTimer() for i := 0; i < b.N; i++ { simpleStorage.fakeWatch.Action(actions[i%len(actions)], items[i%len(items)]) } simpleStorage.fakeWatch.Stop() wg.Wait() b.StopTimer() } // BenchmarkWatchWebsocket measures the cost of serving a watch. func BenchmarkWatchWebsocket(b *testing.B) { items := benchmarkItems(b) simpleStorage := &SimpleRESTStorage{}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Nov 30 17:27:39 UTC 2023 - 30K bytes - Viewed (0) -
src/runtime/proc_test.go
close(stop) done <- true }() go func() { for i := 0; i < b.N; i++ { ping <- <-pong } done <- true }() b.ResetTimer() ping <- true // Start ping-pong <-stop b.StopTimer() <-ping // Let last ponger exit <-done // Make sure goroutines exit <-done <-done } var padData [128]uint64 func stackGrowthRecursive(i int) { var pad [128]uint64 pad = padData
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 14 00:03:57 UTC 2023 - 25.8K bytes - Viewed (0)