// Incr increments the value at the given key.
971887
func (c *Client) Incr(vb uint16, key string,
	amt, def uint64, exp int) (uint64, error) {

	req := &gomemcached.MCRequest{
		Opcode:  gomemcached.INCREMENT,
		VBucket: vb,
		Key:     []byte(key),
		Extras:  make([]byte, 8+8+4),
	}
	binary.BigEndian.PutUint64(req.Extras[:8], amt)
	binary.BigEndian.PutUint64(req.Extras[8:16], def)
	binary.BigEndian.PutUint32(req.Extras[16:20], uint32(exp))

	resp, err := c.Send(req)
	if err != nil {
		return 0, err
	}

	return binary.BigEndian.Uint64(resp.Body), nil
}
492924
func (c *asyncClient) Incr(arg0 string) (result FutureInt64, err Error) {
	arg0bytes := []byte(arg0)

	var resp *PendingResponse
	resp, err = c.conn.QueueRequest(&INCR, [][]byte{arg0bytes})
	if err == nil {
		result = resp.future.(FutureInt64)
	}
	return result, err

}
37343
func IncrMul(a, b, incr []float64) {
	b = b[:len(a)]
	incr = incr[:len(a)]
	for i, v := range a {
		incr[i] += v * b[i]
	}
}
1061783
func (rkv *KeyValue) Inc(key string) (string, error) {
	conn := rkv.pool.Get(rkv.dbindex)
	result, err := redis.Int64(conn.Do("INCR", rkv.id+":"+key))
	if err != nil {
		return "0", err
	}
	return strconv.FormatInt(result, 10), nil
}
400576
func (mapOp *MapOperation) IncrementCounter(key string, increment int64) *MapOperation {
	if mapOp.removeCounters != nil {
		delete(mapOp.removeCounters, key)
	}
	if mapOp.incrementCounters == nil {
		mapOp.incrementCounters = make(map[string]int64)
	}
	mapOp.incrementCounters[key] += increment
	return mapOp
}
778114
func (r *RedisCache) Incr(key string) (int64, error) {
	return redigo.Int64(r.do("INCR", key))
}
1195098
func (f Uint64Vector) Inc(i uint64) (val uint64, err error) {
	val, err = f.Get(i)
	if err != nil {
		if err == leveldb.ErrNotFound {
			val = 0
		} else {
			return 0, err
		}
	}
	val++
	return val, f.Put(i, val)
}
381610
func Incremental(initial, increment time.Duration) Algorithm {
	return func(attempt uint) time.Duration {
		return initial + (increment * time.Duration(attempt))
	}
}
1020246
func (c *Client) Decr(key string, delta, init uint64, exp uint32, ocas uint64) (n, cas uint64, err error) {
	return c.incrdecr(opDecrement, key, delta, init, exp, ocas)
}
810296
func (t *TxStructure) Inc(key []byte, step int64) (int64, error) {
	if t.readWriter == nil {
		return 0, errWriteOnSnapshot
	}
	ek := t.encodeStringDataKey(key)
	// txn Inc will lock this key, so we don't lock it here.
	n, err := kv.IncInt64(t.readWriter, ek, step)
	if kv.ErrNotExist.Equal(err) {
		err = nil
	}
	return n, errors.Trace(err)
}
1204817
func (db *DB) DecrBy(key []byte, decrement int64) (int64, error) {
	return db.incr(key, -decrement)
}
595825
func IncrMod(a, b, incr []float64) {
	b = b[:len(a)]
	incr = incr[:len(a)]

	for i, v := range a {
		incr[i] += math.Mod(v, b[i])
	}
}
1235559
func (b *Bucket) Incr(k string, amt, def uint64, exp int) (val uint64, err error) {
	if ClientOpCallback != nil {
		defer func(t time.Time) { ClientOpCallback("Incr", k, t, err) }(time.Now())
	}

	var rv uint64
	err = b.Do(k, func(mc *memcached.Client, vb uint16) error {
		res, err := mc.Incr(vb, k, amt, def, exp)
		if err != nil {
			return err
		}
		rv = res
		return nil
	})
	return rv, err
}
153028
func (e *SimpleEventHandler) Inc() {
	e.current++
	if e.max < e.current {
		e.max = e.current
	}
}
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:
		}
	}
}
452407
func (s *NoopClient) Inc(stat string, value int64, rate float32) error {
	return nil
}
481959
func IncrSub(a, b, incr []float32) {
	b = b[:len(a)]
	incr = incr[:len(a)]
	for i, v := range a {
		incr[i] += v - b[i]
	}
}