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