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
83 84 85 |
# File 'lib/sidekiq/metrics/query.rb', line 83 def buckets @buckets end |
#ends_at ⇒ Object
Returns the value of attribute ends_at
83 84 85 |
# File 'lib/sidekiq/metrics/query.rb', line 83 def ends_at @ends_at end |
#job_results ⇒ Object
Returns the value of attribute job_results
83 84 85 |
# File 'lib/sidekiq/metrics/query.rb', line 83 def job_results @job_results end |
#marks ⇒ Object
Returns the value of attribute marks
83 84 85 |
# File 'lib/sidekiq/metrics/query.rb', line 83 def marks @marks end |
#size ⇒ Object
Returns the value of attribute size
83 84 85 |
# File 'lib/sidekiq/metrics/query.rb', line 83 def size @size end |
#starts_at ⇒ Object
Returns the value of attribute starts_at
83 84 85 |
# File 'lib/sidekiq/metrics/query.rb', line 83 def starts_at @starts_at end |
Instance Method Details
#prepend_bucket(time) ⇒ Object
91 92 93 94 95 |
# File 'lib/sidekiq/metrics/query.rb', line 91 def prepend_bucket(time) buckets.unshift time.strftime("%H:%M") self.ends_at ||= time self.starts_at = time end |