Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 203 for counter2 (0.15 sec)

  1. 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)
  2. 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)
  3. src/cmd/covdata/metamerge.go

    	// FIXME: in theory either A) len(val.Counters) is zero, or B)
    	// the two lengths are equal. Assert if not? Of course, we could
    	// see odd stuff if there is source file skew.
    	if *verbflag > 4 {
    		fmt.Printf("visit pk=%d fid=%d len(counters)=%d\n", data.PkgIdx, data.FuncIdx, len(data.Counters))
    	}
    	if len(val.Counters) < len(data.Counters) {
    		t := val.Counters
    		val.Counters = mm.AllocateCounters(len(data.Counters))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 12 17:17:47 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  4. src/internal/coverage/defs.go

    // CounterFlavor describes how function and counters are
    // stored/represented in the counter section of the file.
    type CounterFlavor uint8
    
    const (
    	// "Raw" representation: all values (pkg ID, func ID, num counters,
    	// and counters themselves) are stored as uint32's.
    	CtrRaw CounterFlavor = iota + 1
    
    	// "ULeb" representation: all values (pkg ID, func ID, num counters,
    	// and counters themselves) are stored with ULEB128 encoding.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 14 12:51:16 UTC 2023
    - 11.9K bytes
    - Viewed (0)
  5. pkg/proxy/util/nfacct/nfacct_linux_test.go

    				// validate response
    				if tc.err != nil {
    					assert.Nil(t, counter)
    					assert.ErrorContains(t, err, tc.err.Error())
    				} else {
    					assert.NotNil(t, counter)
    					assert.NoError(t, err)
    					assert.Equal(t, tc.counter.Name, counter.Name)
    					assert.Equal(t, tc.counter.Packets, counter.Packets)
    					assert.Equal(t, tc.counter.Bytes, counter.Bytes)
    				}
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Apr 27 06:47:50 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. pilot/pkg/serviceregistry/aggregate/controller_test.go

    	for _, r := range registries {
    		counter := atomic.NewInt32(0)
    		clusterID := r.Cluster()
    		if clusterID == "cluster1" {
    			counter = registry1Counter
    		}
    		if clusterID == "cluster2" {
    			counter = registry2Counter
    		}
    		ctrl.AppendServiceHandlerForCluster(clusterID, func(_, curr *model.Service, event model.Event) {
    			counter.Add(1)
    		})
    		ctrl.AddRegistry(r)
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 15 06:28:11 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  10. src/cmd/cover/cover.go

    func setCounterStmt(f *File, counter string) string {
    	return fmt.Sprintf("%s = 1", counter)
    }
    
    // incCounterStmt returns the expression: __count[23]++.
    func incCounterStmt(f *File, counter string) string {
    	return fmt.Sprintf("%s++", counter)
    }
    
    // atomicCounterStmt returns the expression: atomic.AddUint32(&__count[23], 1)
    func atomicCounterStmt(f *File, counter string) string {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 34.5K bytes
    - Viewed (0)
Back to top