// AddToCounter sends an event to increment the named counter by the specified
// (positive) delta. Maintaining the value of the counter is the responsibility
// of the receiver, as with IncrementCounter.
420906
func AddToCounter(name string, delta uint64) error {
	if metricSender == nil {
		return nil
	}
	return metricSender.AddToCounter(name, delta)
}
241086
func (c *Counter) Add(delta float64) {
	c.obs(c.name, lv.LabelValues{}, delta)
}
756747
func (c *counters) Add(name string, value int64) {
	a := c.getValueAddr(name)
	atomic.AddInt64(a, value)
}
248406
func (sb *StatsdBuffer) Incr(stat string, count int64) error {
	if 0 != count {
		sb.eventChannel <- &event.Increment{Name: stat, Value: count}
	}
	return nil
}
549931
func NewCounterFrom(opts prometheus.CounterOpts, labelNames []string) *Counter {
	cv := prometheus.NewCounterVec(opts, labelNames)
	prometheus.MustRegister(cv)
	return NewCounter(cv)
}
1232924
func NewCounter(name string, help string) *Counter {
	v := &Counter{help: help}
	if name != "" {
		publish(name, v)
	}
	return v
}
1287506
func GetOrRegisterCounter(name string, r Registry) Counter {
	if nil == r {
		r = DefaultRegistry
	}
	return r.GetOrRegister(name, NewCounter).(Counter)
}
1304917
func (p *statsdProvider) NewCounter(name string) metrics.Counter {
	return p.s.NewCounter(name, 1.0)
}
204656
func (*Room) SetCounter(
	ctx context.Context,
	arg *messages.SetCounterArg,
) (*messages.Response, error) {
	counterMetricName := "my_counter"

	for _, reporter := range pitaya.GetMetricsReporters() {
		reporter.ReportCount(counterMetricName, map[string]string{
			"tag1": arg.Tag1,
			"tag2": arg.Tag2,
		}, arg.Value)
	}

	return messages.OKResponse(), nil
}
370271
func (a *AsyncTokenStatusCounter) Increment(status *tokenStatus) {
	select {
	case <-a.stop: // check if the counter has been stopped
		return
	default:
		select {
		case a.input <- status:
		default:
		}
	}
}
574071
func NewCounter(Name string, Tags []string) *Counter {
	return &Counter{Name: Name, Tags: Tags}
}
1092175
func (r *Reporter) NewCounter(name string, desc ...string) (*Counter, error) {
	c, err := speed.NewPCPCounter(0, name, desc...)
	if err != nil {
		return nil, err
	}

	r.c.MustRegister(c)
	return &Counter{c}, nil
}
120809
func (p *Plugin) AddRefCount(count int) {
	p.mu.Lock()
	defer p.mu.Unlock()

	p.refCount += count
}
765667
func MustRegisterCounter(name string, opts ...descOption) ID {
	return defaultRegistry.MustRegisterCounter(name, opts...)
}
548115
func (c *DialContext) EnsureCounter(db string, collection string, id string) error {
	s := c.Ref()
	defer c.UnRef(s)

	err := s.DB(db).C(collection).Insert(bson.M{
		"_id": id,
		"seq": 0,
	})
	if mgo.IsDup(err) {
		return nil
	} else {
		return err
	}
}
840519
func (k *Kademlia) AddrCountC() <-chan int {
	k.lock.Lock()
	defer k.lock.Unlock()

	if k.addrCountC == nil {
		k.addrCountC = make(chan int)
	}
	return k.addrCountC
}
1032411
func (c *Counter) Add(delta float64) {
	c.cv.With(makeLabels(c.lvs...)).Add(delta)
}