Class: ScoutApm::SlowJobRecord
- Inherits:
-
Object
- Object
- ScoutApm::SlowJobRecord
- Defined in:
- lib/scout_apm/slow_job_record.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
What else interesting did we learn?.
-
#exclusive_time ⇒ Object
readonly
Returns the value of attribute exclusive_time.
-
#job_name ⇒ Object
readonly
Returns the value of attribute job_name.
-
#metrics ⇒ Object
readonly
Returns the value of attribute metrics.
-
#queue_name ⇒ Object
readonly
Returns the value of attribute queue_name.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
-
#time ⇒ Object
readonly
When did this job occur.
-
#total_time ⇒ Object
(also: #total_call_time)
readonly
Returns the value of attribute total_time.
Instance Method Summary collapse
-
#call ⇒ Object
Scorable interface.
-
#initialize(queue_name, job_name, time, total_time, exclusive_time, context, metrics, score) ⇒ SlowJobRecord
constructor
A new instance of SlowJobRecord.
- #metric_name ⇒ Object
- #name ⇒ Object
Constructor Details
#initialize(queue_name, job_name, time, total_time, exclusive_time, context, metrics, score) ⇒ SlowJobRecord
Returns a new instance of SlowJobRecord.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/scout_apm/slow_job_record.rb', line 20 def initialize(queue_name, job_name, time, total_time, exclusive_time, context, metrics, score) @queue_name = queue_name @job_name = job_name @time = time @total_time = total_time @exclusive_time = exclusive_time @context = context @metrics = metrics @score = score end |
Instance Attribute Details
#context ⇒ Object (readonly)
What else interesting did we learn?
10 11 12 |
# File 'lib/scout_apm/slow_job_record.rb', line 10 def context @context end |
#exclusive_time ⇒ Object (readonly)
Returns the value of attribute exclusive_time.
13 14 15 |
# File 'lib/scout_apm/slow_job_record.rb', line 13 def exclusive_time @exclusive_time end |
#job_name ⇒ Object (readonly)
Returns the value of attribute job_name.
4 5 6 |
# File 'lib/scout_apm/slow_job_record.rb', line 4 def job_name @job_name end |
#metrics ⇒ Object (readonly)
Returns the value of attribute metrics.
16 17 18 |
# File 'lib/scout_apm/slow_job_record.rb', line 16 def metrics @metrics end |
#queue_name ⇒ Object (readonly)
Returns the value of attribute queue_name.
3 4 5 |
# File 'lib/scout_apm/slow_job_record.rb', line 3 def queue_name @queue_name end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
18 19 20 |
# File 'lib/scout_apm/slow_job_record.rb', line 18 def score @score end |
#time ⇒ Object (readonly)
When did this job occur
7 8 9 |
# File 'lib/scout_apm/slow_job_record.rb', line 7 def time @time end |
#total_time ⇒ Object (readonly) Also known as: total_call_time
Returns the value of attribute total_time.
12 13 14 |
# File 'lib/scout_apm/slow_job_record.rb', line 12 def total_time @total_time end |
Instance Method Details
#call ⇒ Object
Scorable interface
Needed so we can merge ScoredItemSet instances
39 40 41 |
# File 'lib/scout_apm/slow_job_record.rb', line 39 def call self end |
#metric_name ⇒ Object
31 32 33 |
# File 'lib/scout_apm/slow_job_record.rb', line 31 def metric_name "Job/#{queue_name}/#{job_name}" end |
#name ⇒ Object
43 44 45 |
# File 'lib/scout_apm/slow_job_record.rb', line 43 def name metric_name end |