class Trifle::Stats::Operations::Timeseries::Values
Attributes
key[R]
range[R]
Public Class Methods
new(**keywords)
click to toggle source
# File lib/trifle/stats/operations/timeseries/values.rb, line 10 def initialize(**keywords) @key = keywords.fetch(:key) @from = keywords.fetch(:from) @to = keywords.fetch(:to) @range = keywords.fetch(:range) @config = keywords[:config] end
Public Instance Methods
config()
click to toggle source
# File lib/trifle/stats/operations/timeseries/values.rb, line 18 def config @config || Trifle::Stats.default end
perform()
click to toggle source
# File lib/trifle/stats/operations/timeseries/values.rb, line 26 def perform timeline.map do |at| { at => config.driver.get( key: [key, range, at.to_i] ) } end end
timeline()
click to toggle source
# File lib/trifle/stats/operations/timeseries/values.rb, line 22 def timeline Nocturnal.timeline(from: @from, to: @to, range: range) end