Sha256: a95449597ebd5a6e00462a4d525b4774418552a7448b7cfe16fc0a43e98d3691

Contents?: true

Size: 1.28 KB

Versions: 14

Compression:

Stored size: 1.28 KB

Contents

require 'pulse-meter/sensor/base'
require 'pulse-meter/sensor/counter'
require 'pulse-meter/sensor/hashed_counter'
require 'pulse-meter/sensor/indicator'
require 'pulse-meter/sensor/timeline'
require 'pulse-meter/sensor/timelined/average'
require 'pulse-meter/sensor/timelined/counter'
require 'pulse-meter/sensor/timelined/hashed_counter'
require 'pulse-meter/sensor/timelined/min'
require 'pulse-meter/sensor/timelined/max'
require 'pulse-meter/sensor/timelined/percentile'
require 'pulse-meter/sensor/timelined/median'

# Top level sensor module
module PulseMeter

  # Atomic sensor data
  SensorData = Struct.new(:start_time, :value)

  # General sensor exception
  class SensorError < StandardError; end

  # Exception to be raised when sensor name is malformed
  class BadSensorName < SensorError
    def initialize(name, options = {})
      super("Bad sensor name: `#{name}', only a-z letters and _ are allowed")
    end
  end

  # Exception to be raised when Redis is not initialized
  class RedisNotInitialized < SensorError
    def initialize
      super("PulseMeter.redis is not set")
    end
  end

  # Exception to be raised when sensor cannot be dumped
  class DumpError < SensorError; end

  # Exception to be raised when sensor cannot be restored
  class RestoreError < SensorError; end

end
  

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
pulse-meter-client-backport-0.1.2 lib/pulse-meter/sensor.rb
pulse-meter-0.1.9 lib/pulse-meter/sensor.rb
pulse-meter-client-backport-0.1.1 lib/pulse-meter/sensor.rb
pulse-meter-0.1.8 lib/pulse-meter/sensor.rb
pulse-meter-0.1.7 lib/pulse-meter/sensor.rb
pulse-meter-0.1.6 lib/pulse-meter/sensor.rb
pulse-meter-0.1.5 lib/pulse-meter/sensor.rb
pulse-meter-0.1.4 lib/pulse-meter/sensor.rb
pulse-meter-0.1.3 lib/pulse-meter/sensor.rb
pulse-meter-0.1.2 lib/pulse-meter/sensor.rb
pulse-meter-0.1.1 lib/pulse-meter/sensor.rb
pulse-meter-client-backport-0.1.0 lib/pulse-meter/sensor.rb
pulse-meter-0.1.0 lib/pulse-meter/sensor.rb
pulse-meter-0.0.1 lib/pulse-meter/sensor.rb