- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 32 for doBench (0.12 sec)
-
src/compress/flate/reader_test.go
{"Digits", "../testdata/e.txt"}, // Newton is Isaac Newtons's educational text on Opticks. {"Newton", "../../testdata/Isaac.Newton-Opticks.txt"}, } func BenchmarkDecode(b *testing.B) { doBench(b, func(b *testing.B, buf0 []byte, level, n int) { b.ReportAllocs() b.StopTimer() b.SetBytes(int64(n)) compressed := new(bytes.Buffer) w, err := NewWriter(compressed, level) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 09 19:12:23 UTC 2020 - 2.3K bytes - Viewed (0) -
test/fibo.go
fmt.Printf("fibo(%d) = %s (%d bits, %s)\n", n, f, f.bitlen(), t) } func benchFibo(b *testing.B, n int, half, opt bool) { for i := 0; i < b.N; i++ { fibo(n, half, opt) } } func doBench(half, opt bool) { w := tabwriter.NewWriter(os.Stdout, 0, 8, 2, ' ', tabwriter.AlignRight) fmt.Fprintf(w, "wordsize = %d, half = %v, opt = %v\n", W, half, opt) fmt.Fprintf(w, "n\talloc count\talloc bytes\tns/op\ttime/op\t\n")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 08 22:22:58 UTC 2014 - 6.3K bytes - Viewed (0) -
src/testing/benchmark.go
fmt.Fprintf(b.w, "cpu: %s\n", cpu) } }) if b.context != nil { // Running go test --test.bench b.context.processBench(b) // Must call doBench. } else { // Running func Benchmark. b.doBench() } } func (b *B) doBench() BenchmarkResult { go b.launch() <-b.signal return b.result } // launch launches the benchmark function. It gradually increases the number
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/compress/flate/writer_test.go
// license that can be found in the LICENSE file. package flate import ( "bytes" "fmt" "io" "math/rand" "runtime" "testing" ) func BenchmarkEncode(b *testing.B) { doBench(b, func(b *testing.B, buf0 []byte, level, n int) { b.StopTimer() b.SetBytes(int64(n)) buf1 := make([]byte, n) for i := 0; i < n; i += len(buf0) { if len(buf0) > n-i { buf0 = buf0[:n-i] }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 20 18:41:18 UTC 2020 - 5.4K bytes - Viewed (0) -
internal/pubsub/pubsub_test.go
ch2 := make(chan Maskable, 1) ch3 := make(chan Maskable, 1) doneCh := make(chan struct{}) defer close(doneCh) if err := ps.Subscribe(MaskAll, ch1, doneCh, nil); err != nil { t.Fatalf("unexpected error: %v", err) } if err := ps.Subscribe(MaskAll, ch2, doneCh, nil); err != nil { t.Fatalf("unexpected error: %v", err) } if err := ps.Subscribe(MaskAll, ch3, doneCh, nil); err == nil { t.Fatalf("unexpected nil err") } }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 5.8K bytes - Viewed (0) -
internal/store/store.go
// Get next key. case <-doneCh: return } } } select { case <-retryTicker.C: case <-doneCh: return } } }() return keyCh } // sendItems - Reads items from the store and re-plays. func sendItems(target Target, keyCh <-chan Key, doneCh <-chan struct{}, logger logger) { retryTicker := time.NewTicker(retryInterval)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Mar 25 16:44:20 UTC 2024 - 3.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/promise/counting.go
// - an optional initial value, // - an optional "done" channel, // - the value that is Set after the "done" channel becomes selectable. // Note that for this implementation, the reaction to `doneCh` // becoming selectable does not wait for a Get. // If `doneCh != nil` then the caller promises to close it reasonably promptly // (to the degree allowed by the Go runtime scheduler), and increment the // goroutine counter before that.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 10 14:37:53 UTC 2021 - 3.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/healthz_test.go
t.Run("test that liveness check returns true until the delay has elapsed", func(t *testing.T) { t0 := time.Unix(0, 0) c := testingclock.NewFakeClock(t0) doneCh := make(chan struct{}) healthCheck := delayedHealthCheck(postStartHookHealthz{"test", doneCh}, c, time.Duration(10)*time.Second) err := healthCheck.Check(nil) if err != nil { t.Errorf("Got %v, expected no error", err) } c.Step(10 * time.Second)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Sep 15 09:52:18 UTC 2021 - 2.2K bytes - Viewed (0) -
internal/pubsub/pubsub.go
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Feb 06 16:57:30 UTC 2024 - 5.2K bytes - Viewed (0) -
platforms/documentation/docs/src/snippets/native-binaries/tool-chains/groovy/build.gradle
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Nov 27 17:53:42 UTC 2023 - 1.4K bytes - Viewed (0)