Class: Sidekiq::Metrics::Query::Result
- Inherits:
-
Struct
- Object
- Struct
- Sidekiq::Metrics::Query::Result
- Defined in:
- lib/sidekiq/metrics/query.rb
Instance Attribute Summary collapse
-
#buckets ⇒ Object
Returns the value of attribute buckets.
-
#ends_at ⇒ Object
Returns the value of attribute ends_at.
-
#job_results ⇒ Object
Returns the value of attribute job_results.
-
#marks ⇒ Object
Returns the value of attribute marks.
-
#size ⇒ Object
Returns the value of attribute size.
-
#starts_at ⇒ Object
Returns the value of attribute starts_at.
Instance Method Summary collapse
-
#initialize ⇒ Result
constructor
A new instance of Result.
- #prepend_bucket(time) ⇒ Object
Constructor Details
Instance Attribute Details
#buckets ⇒ Object
Returns the value of attribute buckets
87 88 89 |
# File 'lib/sidekiq/metrics/query.rb', line 87 def buckets @buckets end |
#ends_at ⇒ Object
Returns the value of attribute ends_at
87 88 89 |
# File 'lib/sidekiq/metrics/query.rb', line 87 def ends_at @ends_at end |
#job_results ⇒ Object
Returns the value of attribute job_results
87 88 89 |
# File 'lib/sidekiq/metrics/query.rb', line 87 def job_results @job_results end |
#marks ⇒ Object
Returns the value of attribute marks
87 88 89 |
# File 'lib/sidekiq/metrics/query.rb', line 87 def marks @marks end |
#size ⇒ Object
Returns the value of attribute size
87 88 89 |
# File 'lib/sidekiq/metrics/query.rb', line 87 def size @size end |
#starts_at ⇒ Object
Returns the value of attribute starts_at
87 88 89 |
# File 'lib/sidekiq/metrics/query.rb', line 87 def starts_at @starts_at end |
Instance Method Details
#prepend_bucket(time) ⇒ Object
95 96 97 98 99 |
# File 'lib/sidekiq/metrics/query.rb', line 95 def prepend_bucket(time) buckets.unshift time.strftime("%H:%M") self.ends_at ||= time self.starts_at = time end |