Sha256: 7acdbfc90de1703d9cbba6298d0fb3969450464a290c69671f0bf33e588f03ad

Contents?: true

Size: 488 Bytes

Versions: 8

Compression:

Stored size: 488 Bytes

Contents

require 'date'

module Mongodb
  module Graphite
    module Agent

      class OpCountersSample
        attr_reader :values, :sample_time

        def initialize(values, sample_time = DateTime.now.to_s)
          @values = values
          @sample_time = sample_time
        end

        def marshal_dump
          [@sample_time, @values]
        end

        def marshal_load array
          @sample_time, @values = array
        end

      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mongodb-graphite-agent-0.1.4 lib/mongodb/graphite/agent/op_counters_sample.rb
mongodb-graphite-agent-0.1.3 lib/mongodb/graphite/agent/op_counters_sample.rb
mongodb-graphite-agent-0.1.2 lib/mongodb/graphite/agent/op_counters_sample.rb
mongodb-graphite-agent-0.0.8 lib/mongodb/graphite/agent/op_counters_sample.rb
mongodb-graphite-agent-0.0.6 lib/mongodb/graphite/agent/op_counters_sample.rb
mongodb-graphite-agent-0.0.5 lib/mongodb/graphite/agent/op_counters_sample.rb
mongodb-graphite-agent-0.0.3 lib/mongodb/graphite/agent/op_counters_sample.rb
mongodb-graphite-agent-0.0.2 lib/mongodb/graphite/agent/op_counters_sample.rb