Class: Timescaledb::Stats
- Inherits:
-
Object
- Object
- Timescaledb::Stats
- Defined in:
- lib/timescaledb/stats.rb,
lib/timescaledb/stats/chunks.rb,
lib/timescaledb/stats/job_stats.rb,
lib/timescaledb/stats/hypertables.rb,
lib/timescaledb/stats/continuous_aggregates.rb
Defined Under Namespace
Classes: Chunks, ContinuousAggregates, Hypertables, JobStats
Instance Method Summary collapse
-
#initialize(hypertables = [], connection = Timescaledb.connection) ⇒ Stats
constructor
A new instance of Stats.
- #to_h ⇒ Object
Constructor Details
#initialize(hypertables = [], connection = Timescaledb.connection) ⇒ Stats
Returns a new instance of Stats.
9 10 11 12 |
# File 'lib/timescaledb/stats.rb', line 9 def initialize(hypertables = [], connection = Timescaledb.connection) @hypertables = hypertables @connection = connection end |
Instance Method Details
#to_h ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/timescaledb/stats.rb', line 14 def to_h { hypertables: Hypertables.new(@hypertables).to_h, continuous_aggregates: ContinuousAggregates.new.to_h, jobs_stats: JobStats.new.to_h } end |