Class: RSpec::Buildkite::Analytics::Tracer::Span
- Inherits:
-
Object
- Object
- RSpec::Buildkite::Analytics::Tracer::Span
- Defined in:
- lib/rspec/buildkite/analytics/tracer.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#detail ⇒ Object
Returns the value of attribute detail.
-
#end_at ⇒ Object
Returns the value of attribute end_at.
-
#section ⇒ Object
Returns the value of attribute section.
-
#start_at ⇒ Object
Returns the value of attribute start_at.
Instance Method Summary collapse
- #as_hash ⇒ Object
-
#initialize(section, start_at, end_at, detail) ⇒ Span
constructor
A new instance of Span.
Constructor Details
#initialize(section, start_at, end_at, detail) ⇒ Span
Returns a new instance of Span.
10 11 12 13 14 15 16 |
# File 'lib/rspec/buildkite/analytics/tracer.rb', line 10 def initialize(section, start_at, end_at, detail) @section = section @start_at = start_at @end_at = end_at @detail = detail @children = [] end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
8 9 10 |
# File 'lib/rspec/buildkite/analytics/tracer.rb', line 8 def children @children end |
#detail ⇒ Object
Returns the value of attribute detail.
8 9 10 |
# File 'lib/rspec/buildkite/analytics/tracer.rb', line 8 def detail @detail end |
#end_at ⇒ Object
Returns the value of attribute end_at.
8 9 10 |
# File 'lib/rspec/buildkite/analytics/tracer.rb', line 8 def end_at @end_at end |
#section ⇒ Object
Returns the value of attribute section.
8 9 10 |
# File 'lib/rspec/buildkite/analytics/tracer.rb', line 8 def section @section end |
#start_at ⇒ Object
Returns the value of attribute start_at.
8 9 10 |
# File 'lib/rspec/buildkite/analytics/tracer.rb', line 8 def start_at @start_at end |
Instance Method Details
#as_hash ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rspec/buildkite/analytics/tracer.rb', line 18 def as_hash { section: section, start_at: start_at, end_at: end_at, duration: end_at - start_at, detail: detail, children: children.map(&:as_hash), }.with_indifferent_access end |