Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for doBench (0.12 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. internal/pubsub/pubsub.go

    		enc := json.NewEncoder(&buf)
    		for {
    			select {
    			case <-doneCh:
    				return
    			case v, ok := <-subChT:
    				if !ok {
    					return
    				}
    				buf.Reset()
    				err := enc.Encode(v)
    				if err != nil {
    					return
    				}
    
    				select {
    				case subCh <- append(GetByteBuffer()[:0], buf.Bytes()...):
    					continue
    				case <-doneCh:
    					return
    				}
    			}
    		}
    	}()
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Feb 06 16:57:30 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  7. platforms/documentation/docs/src/snippets/native-binaries/tool-chains/groovy/build.gradle

                eachPlatform {
                    cppCompiler.withArguments { args ->
                        args << "-DFRENCH"
                    }
                }
            }
            clang(Clang) {
                eachPlatform {
                    cCompiler.withArguments { args ->
                        Collections.replaceAll(args, "CUSTOM", "-DFRENCH")
                    }
                    linker.withArguments { args ->
                        args.remove "CUSTOM"
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  8. pkg/config/mesh/watcher_test_utils.go

    type TestWatcher struct {
    	internalWatcher
    	doneCh chan struct{} // used to implement a blocking Update method
    }
    
    func NewTestWatcher(meshConfig *meshconfig.MeshConfig) *TestWatcher {
    	w := &TestWatcher{
    		internalWatcher: internalWatcher{},
    	}
    	w.internalWatcher.MeshConfig.Store(meshConfig)
    	w.doneCh = make(chan struct{}, 1)
    	w.AddMeshHandler(func() {
    		w.doneCh <- struct{}{}
    	})
    	return w
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Nov 03 00:26:45 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/promise/counting_test.go

    	os.Exit(m.Run())
    }
    
    func TestCountingWriteOnceSet(t *testing.T) {
    	oldTime := time.Now()
    	cval := &oldTime
    	doneCh := make(chan struct{})
    	now := time.Now()
    	clock, counter := testeventclock.NewFake(now, 0, nil)
    	var lock sync.Mutex
    	wr := NewCountingWriteOnce(counter, &lock, nil, doneCh, cval)
    	gots := make(chan interface{}, 1)
    	goGetExpectNotYet(t, clock, counter, wr, gots, "Set")
    	aval := &now
    	func() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 10 14:37:53 UTC 2021
    - 4.6K bytes
    - Viewed (0)
  10. src/runtime/semasleep_test.go

    	}
    	beforeStart := time.Now()
    	if err := cmd.Start(); err != nil {
    		t.Fatalf("Failed to start command: %v", err)
    	}
    
    	waiting := false
    	doneCh := make(chan error, 1)
    	t.Cleanup(func() {
    		cmd.Process.Kill()
    		if waiting {
    			<-doneCh
    		} else {
    			cmd.Wait()
    		}
    	})
    
    	// Wait for After1 to close its stdout so that we know the runtime's SIGIO
    	// handler is registered.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 06 17:48:24 UTC 2023
    - 3.5K bytes
    - Viewed (0)
Back to top