Class: AppPerfRpm::Tracer::Instance
- Inherits:
-
Object
- Object
- AppPerfRpm::Tracer::Instance
- Defined in:
- lib/app_perf_rpm/tracer.rb
Instance Attribute Summary collapse
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#layer ⇒ Object
Returns the value of attribute layer.
-
#opts ⇒ Object
Returns the value of attribute opts.
-
#start ⇒ Object
Returns the value of attribute start.
Instance Method Summary collapse
- #finish(opts = {}) ⇒ Object
-
#initialize(layer, opts = {}) ⇒ Instance
constructor
A new instance of Instance.
- #submit(opts = {}) ⇒ Object
Constructor Details
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration.
111 112 113 |
# File 'lib/app_perf_rpm/tracer.rb', line 111 def duration @duration end |
#layer ⇒ Object
Returns the value of attribute layer.
111 112 113 |
# File 'lib/app_perf_rpm/tracer.rb', line 111 def layer @layer end |
#opts ⇒ Object
Returns the value of attribute opts.
111 112 113 |
# File 'lib/app_perf_rpm/tracer.rb', line 111 def opts @opts end |
#start ⇒ Object
Returns the value of attribute start.
111 112 113 |
# File 'lib/app_perf_rpm/tracer.rb', line 111 def start @start end |
Instance Method Details
#finish(opts = {}) ⇒ Object
120 121 122 123 |
# File 'lib/app_perf_rpm/tracer.rb', line 120 def finish(opts = {}) @span..merge!(opts) @span.ended_at = Time.now.to_f end |
#submit(opts = {}) ⇒ Object
125 126 127 128 129 130 |
# File 'lib/app_perf_rpm/tracer.rb', line 125 def submit(opts = {}) if ::AppPerfRpm::Tracer.tracing? @span..merge!(opts) ::AppPerfRpm.store(@span) end end |