- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 1,099 for iterations (0.5 sec)
-
src/internal/reflectlite/all_test.go
} if runtime.GOMAXPROCS(0) > 1 { t.Skip("skipping; GOMAXPROCS>1") } i := -1 allocs := testing.AllocsPerRun(n, func() { f(i) i++ }) if allocs > 0 { t.Errorf("%d iterations: got %v mallocs, want 0", n, allocs) } } func TestAllocations(t *testing.T) { noAlloc(t, 100, func(j int) { var i any var v Value i = []int{j, j, j} v = ValueOf(i)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 16 19:26:08 UTC 2023 - 24.2K bytes - Viewed (0) -
src/runtime/chan_test.go
// mark worker to shrink the sender's stack and race with the // sender parking. // // Unfortunately the race window here is so small that we // either need a ridiculous number of iterations, or we add // "usleep(1000)" to park_m, just before the unlockf call. const n = 10 send := func(c chan<- int, done chan struct{}) { for i := 0; i < n; i++ { c <- i // Use lots of stack briefly so that
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 31 20:47:35 UTC 2023 - 23.4K bytes - Viewed (0) -
src/runtime/map_test.go
first = append(first, i) } // 800 chances to get a different iteration order. // See bug 8736 for why we need so many tries. for n := 0; n < 800; n++ { idx := 0 for i := range m { if i != first[idx] { // iteration order changed. continue NextRound } idx++ } } t.Fatalf("constant iteration order on round %d: %v", round, first) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 33.5K bytes - Viewed (0) -
src/net/timeout_test.go
// tests that automatically increase timeouts until success. // // Lower values may allow tests to succeed more quickly if the value is close // to the true minimum, but may require more iterations (and waste more time // and CPU power on failed attempts) if the timeout is too low. minDynamicTimeout = 1 * time.Millisecond // maxDynamicTimeout is the maximum timeout to attempt for
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 24 18:06:55 UTC 2024 - 30K bytes - Viewed (0) -
src/go/doc/comment/parse.go
spanPara ) func parseSpans(lines []string) []span { var spans []span // The loop may process a line twice: once as unindented // and again forced indented. So the maximum expected // number of iterations is 2*len(lines). The repeating logic // can be subtle, though, and to protect against introduction // of infinite loops in future changes, we watch to see that // we are not looping too much. A panic is better than a
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 33.5K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/wait/wait_test.go
done <- struct{}{} go func() { for i := 0; i < 2; i++ { _, open := <-ch if !open { return } } t.Error("expected closed channel after two iterations") }() <-complete if len(errc) != 0 { t.Fatal(<-errc) } } func Test_waitFor(t *testing.T) { var invocations int testCases := map[string]struct { F ConditionFunc
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 26 16:28:45 UTC 2024 - 41.1K bytes - Viewed (0) -
src/runtime/mpagealloc.go
i <<= levelBits[l] // Slice out the block of entries we care about. entries := p.summary[l][i : i+entriesPerBlock] // Determine j0, the first index we should start iterating from. // The searchAddr may help us eliminate iterations if we followed the // searchAddr on the previous level or we're on the root level, in which // case the searchAddr should be the same as i after levelShift. j0 := 0
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 39.2K bytes - Viewed (0) -
src/text/template/exec.go
if s.vars[i].name == name { s.vars[i].value = value return } } s.errorf("undefined variable: %s", name) } // setTopVar overwrites the top-nth variable on the stack. Used by range iterations. func (s *state) setTopVar(n int, value reflect.Value) { s.vars[len(s.vars)-n].value = value } // varValue returns the value of the named variable. func (s *state) varValue(name string) reflect.Value {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 21:22:24 UTC 2024 - 32K bytes - Viewed (0) -
src/internal/fuzz/worker.go
// explains why this choice was made.) const chainedMutations = 5 // fuzz runs the test function on random variations of the input value in shared // memory for a limited duration or number of iterations. // // fuzz returns early if it finds an input that crashes the fuzz function (with // fuzzResponse.Err set) or an input that expands coverage (with // fuzzResponse.InterestingDuration set). //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:28 UTC 2024 - 37.7K bytes - Viewed (0) -
src/runtime/trace.go
// also no stale generation values left. Therefore, it's safe to flush // any buffers that remain in that generation's slot. const debugDeadlock = false systemstack(func() { // Track iterations for some rudimentary deadlock detection. i := 0 detectedDeadlock := false for mToFlush != nil { prev := &mToFlush for mp := *prev; mp != nil; { if mp.trace.seqlock.Load()%2 != 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:17:41 UTC 2024 - 37.1K bytes - Viewed (0)