Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 69 for counter2 (0.12 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/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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. pkg/kubelet/winstats/network_stats.go

    	if err != nil {
    		klog.ErrorS(err, "Unable to get packetsReceivedPerSecond perf counter data")
    		return nil, err
    	}
    
    	packetsSentPerSecondData, err := n.packetsSentPerSecondCounter.getDataList()
    	if err != nil {
    		klog.ErrorS(err, "Unable to get packetsSentPerSecond perf counter data")
    		return nil, err
    	}
    
    	bytesReceivedPerSecondData, err := n.bytesReceivedPerSecondCounter.getDataList()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

      /**
       * Multiple threads using same array of counters successfully update a number of times equal to
       * total count
       */
      public void testCountingInMultipleThreads() throws InterruptedException {
        final AtomicDoubleArray aa = new AtomicDoubleArray(SIZE);
        for (int i = 0; i < SIZE; i++) {
          aa.set(i, (double) COUNTDOWN);
        }
        Counter c1 = new Counter(aa);
        Counter c2 = new Counter(aa);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 19:21:11 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  10. cmd/metrics-v3-types.go

    type MetricType int
    
    const (
    	// CounterMT - represents a counter metric.
    	CounterMT MetricType = iota
    	// GaugeMT - represents a gauge metric.
    	GaugeMT
    	// HistogramMT - represents a histogram metric.
    	HistogramMT
    	// rangeL - represents a range label.
    	rangeL = "range"
    )
    
    func (mt MetricType) String() string {
    	switch mt {
    	case CounterMT:
    		return "counter"
    	case GaugeMT:
    		return "gauge"
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 23 07:41:18 UTC 2024
    - 15.1K bytes
    - Viewed (0)
Back to top