Sha256: 4e09397a9e476875cb507e42a5ea33641df5eb1762ec71999a6247f3c5caf9e6
Contents?: true
Size: 804 Bytes
Versions: 3
Compression:
Stored size: 804 Bytes
Contents
# frozen_string_literal: true module Trifle module Stats module Operations module Timeseries class Increment attr_reader :key, :values def initialize(**keywords) @key = keywords.fetch(:key) @at = keywords.fetch(:at) @values = keywords.fetch(:values) @config = keywords[:config] end def config @config || Trifle::Stats.default end def perform config.ranges.map do |range| at = Nocturnal.new(@at, config: config).send(range) config.driver.inc( key: [key, range, at.to_i].join(config.separator), **values ) end end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems