Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 172 for counter2 (0.12 sec)

  1. subprojects/core/src/integTest/groovy/org/gradle/api/services/BuildServiceIntegrationTest.groovy

                    }
                }
                apply plugin: CounterConventionPlugin
    
                def counter1 = project.gradle.sharedServices.registerIfAbsent("counter1", CountingService) {
                    parameters.initial = 0
                }
                def counter2 = project.gradle.sharedServices.registerIfAbsent("counter2", CountingService) {
                    parameters.initial = 10
                }
                task count {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Jun 06 19:15:46 UTC 2024
    - 61K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/telemetry/internal/counter/counter.go

    	return &Counter{name: name, file: &defaultFile}
    }
    
    // Inc adds 1 to the counter.
    func (c *Counter) Inc() {
    	c.Add(1)
    }
    
    // Add adds n to the counter. n cannot be negative, as counts cannot decrease.
    func (c *Counter) Add(n int64) {
    	debugPrintf("Add %q += %d", c.name, n)
    
    	if n < 0 {
    		panic("Counter.Add negative")
    	}
    	if n == 0 {
    		return
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  3. src/internal/coverage/cfile/emit.go

    				}
    			} else {
    				// The package ID value stored in the counter array
    				// has 1 added to it (so as to preclude the
    				// possibility of a zero value ; see
    				// runtime.addCovMeta), so subtract off 1 here to form
    				// the real package ID.
    				pkgId--
    			}
    
    			tcounters = rdCounters(counters, tcounters)
    			if err := f(pkgId, funcId, tcounters); err != nil {
    				return err
    			}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:57:47 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  4. src/internal/coverage/cfile/testsupport.go

    			nCtrs := sd[i+coverage.NumCtrsOffset].Load()
    			cst := i + coverage.FirstCtrOffset
    
    			if cst+int(nCtrs) > len(sd) {
    				break
    			}
    			counters := sd[cst : cst+int(nCtrs)]
    			for i := range counters {
    				if counters[i].Load() != 0 {
    					totExec++
    				}
    			}
    			i += coverage.FirstCtrOffset + int(nCtrs) - 1
    		}
    	}
    	if tot == 0 {
    		return 0.0
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:57:47 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  5. src/internal/coverage/cfile/apis.go

    	//       if alwaysTrue() {
    	//         XYZ()                // counter update here
    	//       }
    	//     }
    	//
    	// In the instrumented version of ABC, the prolog of the function
    	// will contain a series of stores to the initial portion of the
    	// counter array to write number-of-counters, pkgid, funcid. Later
    	// in the function there is also a store to increment a counter
    	// for the block containing the call to XYZ(). If the CPU is
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:57:47 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  6. src/internal/coverage/encodecounter/encode.go

    			towr = len(buf)
    		} else {
    			panic("internal error: bad counter flavor")
    		}
    		if sz, err := ws.Write(buf); err != nil {
    			return err
    		} else if sz != towr {
    			return fmt.Errorf("writing counters: short write")
    		}
    		return nil
    	}
    
    	// Write out entries for each live function.
    	emitter := func(pkid uint32, funcid uint32, counters []uint32) error {
    		cfw.csh.FcnEntries++
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/telemetry/internal/counter/file.go

    			}
    			wroteNext = true
    		} else {
    			c.next.Store(next)
    		}
    		if f.counters.CompareAndSwap(head, c) {
    			debugPrintf("registered %s %p\n", c.Name(), f.counters.Load())
    			return
    		}
    		debugPrintf("register %s cas2 failed %p %p\n", c.Name(), f.counters.Load(), head)
    	}
    }
    
    // invalidateCounters marks as invalid all the pointers
    // held by f's counters and then refreshes them.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/telemetry/internal/upload/reports.go

    			continue
    		}
    		prog := findProgReport(x.Meta, report)
    		for k, v := range x.Count {
    			if counter.IsStackCounter(k) {
    				// stack
    				prog.Stacks[k] += int64(v)
    			} else {
    				// counter
    				prog.Counters[k] += int64(v)
    			}
    			succeeded = true
    			fok = true
    		}
    		if !fok {
    			u.logger.Printf("no counters found in %s", f)
    		}
    	}
    	if !succeeded {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 14:52:56 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  9. src/runtime/coverage/coverage.go

    	return cfile.WriteCounters(w)
    }
    
    // ClearCounters clears/resets all coverage counter variables in the
    // currently running program. It returns an error if the program in
    // question was not built with the "-cover" flag. Clearing of coverage
    // counters is also not supported for programs not using atomic
    // counter mode (see more detailed comments below for the rationale
    // here).
    func ClearCounters() error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 19:41:02 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/telemetry/start.go

    	// which is the time used by the upload logic to determine whether counter
    	// file data should be uploaded. Only counter files that have expired before
    	// the start time are considered for upload.
    	//
    	// This field can be used to simulate a future upload that collects recently
    	// modified counters.
    	UploadStartTime time.Time
    
    	// UploadURL, if set, overrides the URL used to receive uploaded reports. If
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 14:52:56 UTC 2024
    - 10.8K bytes
    - Viewed (0)
Back to top