Class: SlateDb::Metrics
- Inherits:
-
Object
- Object
- SlateDb::Metrics
- Defined in:
- lib/slatedb/metrics.rb
Instance Method Summary collapse
-
#[](name) ⇒ Integer?
Get a metric value by name.
-
#to_h ⇒ Hash
Convert all metrics to a hash.
Instance Method Details
#[](name) ⇒ Integer?
Get a metric value by name.
9 10 11 |
# File 'lib/slatedb/metrics.rb', line 9 def [](name) get(name) end |
#to_h ⇒ Hash
Convert all metrics to a hash.
16 17 18 |
# File 'lib/slatedb/metrics.rb', line 16 def to_h names.to_h { |metric_name| [metric_name, get(metric_name)] } end |