Increment a counter specified by a name, and a sequence of (key, value) pairs.
543805
public static void increment(String name, String... tags) {
    final MonitorConfig.Builder configBuilder = MonitorConfig.builder(name);
    Preconditions.checkArgument(tags.length % 2 == 0,
        "The sequence of (key, value) pairs must have even size: one key, one value");
    try {
      for (int i = 0; i < tags.length; i += 2) {
        configBuilder.withTag(tags[i], tags[i + 1]);
      }
      increment(configBuilder.build());
    } catch (IllegalArgumentException e) {
      LOGGER.warn("Failed to get a counter to increment: {}", e.getMessage());
    }
  }
140363
def _initialize_counters(model_class, name, bases, attrs):
    """"""
    model_class._counters = []
    for k, v in attrs.iteritems():
        if isinstance(v, Counter):
            model_class._counters.append(k)
610941
def increment(self, key: Any, by: int = 1) -> None:
        
        if key is not None:
            self[key] = self.get(key, 0) + by
1070718
def increment(self):
        ""
        self._count += 1
        waiters = self._waiters.pop(self._count, [])
        if waiters:
            scheduler.state.awoken_from_events.update(waiters)
1213299
def sub_map(self, counters_map):
    
    for counter_name in counters_map.counters:
      self.increment(counter_name, -counters_map.counters[counter_name])
796055
def increment(d, key, val=1):
    
    if key in d:
        d[key] += val
    else:
        d[key] = val
316957
def _dict_increment(self, dictionary, key):
        """"""
        if key in dictionary:
            dictionary[key] += 1
        else:
            dictionary[key] = 1
1141958
public void incrementCounter(BugChecker bugChecker, String key, int count) {
    statisticsCollector.incrementCounter(statsKey(bugChecker.canonicalName() + "-" + key), count);
  }
556695
def counter(self, key, **dims):
        """"""
        return super(RegexRegistry, self).counter(self._get_key(key), **dims)
1238725
public void add(Counter<? extends Pair<T>> counter) {
        for (Map.Entry<? extends Pair<T>,Integer> e : counter) {
            count(e.getKey(), e.getValue());
        }
    }
617315
private function incrementLikeCount()
	{
		$counter = $this->likeCounter()->first();
		
		if($counter) {
			$counter->count++;
			$counter->save();
		} else {
			$counter = new LikeCounter;
			$counter->count = 1;
			$this->likeCounter()->save($counter);
		}
	}
637318
static void incrementKey(byte[] key)
  {
    for (int i = key.length - 1; i >= 0; i--) {
      int v = key[i] & 0xff;
      
      if (v < 0xff) {
        key[i] = (byte) (v + 1);
        return;
      }
      
      key[i] = 0;
    }
  }
19447
def increment_for(obj)
      # decide the time of event asap
      ts = Time.now.ceil.to_i

      if obj.class.ancestors.include?Cequel::Record
        args = obj.key_attributes.collect { |k,v|  v.to_s }
        cache_key = generate_key(ts, obj.class.name, *args)

        val = Cequel::Record.redis.get(cache_key)
        if val.nil?
          val = 1
        else
          val = val.to_i + 1
        end

        ttl = (time_window + 1) * 60

        # Update a sharded counter
        Cequel::Record.redis.setex(cache_key, ttl, val)

        # Optionally, update the index
        index_key = generate_index_key(ts, obj.class.name, *args)
        index_present = Cequel::Record.redis.get(index_key).try(:to_i)
        if index_present != 1
          Cequel::Record.redis.setex(index_key, ttl, 1)
        end
      end

    end
639577
def Increment(self, delta, fields=None):
    """"""
    if delta < 0:
      raise ValueError(
          "Counter increment should not be < 0 (received: %d)" % delta)

    self._metric_values[_FieldsToKey(fields)] = self.Get(fields=fields) + delta
962425
def increment(self, counter_name, delta):
    
    current_value = self.counters.get(counter_name, 0)
    new_value = current_value + delta
    self.counters[counter_name] = new_value
    return new_value
955168
public function incrementCounter($name, $value = 1) {
        if (!isset($this->counters[$name])) {
            $this->counters[$name] = 0;
        }
        $this->counters[$name] += $value;
    }
35974
def increment(self, gold_set, test_set):
        ""
        self.gold += len(gold_set)
        self.test += len(test_set)
        self.correct += len(gold_set & test_set)