Class: Neetodeploy::Rails::MetricsStore
- Inherits:
-
Object
- Object
- Neetodeploy::Rails::MetricsStore
- Includes:
- Singleton
- Defined in:
- lib/neetodeploy/autoscale/rails/metrics_store.rb
Instance Attribute Summary collapse
-
#metrics ⇒ Object
readonly
Returns the value of attribute metrics.
Instance Method Summary collapse
- #flush ⇒ Object
-
#initialize ⇒ MetricsStore
constructor
A new instance of MetricsStore.
- #push(queue_time) ⇒ Object
Constructor Details
#initialize ⇒ MetricsStore
Returns a new instance of MetricsStore.
12 13 14 |
# File 'lib/neetodeploy/autoscale/rails/metrics_store.rb', line 12 def initialize @metrics = [] end |
Instance Attribute Details
#metrics ⇒ Object (readonly)
Returns the value of attribute metrics.
10 11 12 |
# File 'lib/neetodeploy/autoscale/rails/metrics_store.rb', line 10 def metrics @metrics end |
Instance Method Details
#flush ⇒ Object
20 21 22 23 24 |
# File 'lib/neetodeploy/autoscale/rails/metrics_store.rb', line 20 def flush result = @metrics @metrics = [] result end |
#push(queue_time) ⇒ Object
16 17 18 |
# File 'lib/neetodeploy/autoscale/rails/metrics_store.rb', line 16 def push(queue_time) @metrics << queue_time end |