Class: Sleuth::Transaction
- Inherits:
-
Struct
- Object
- Struct
- Sleuth::Transaction
- Defined in:
- lib/sleuth/transaction.rb
Constant Summary collapse
- @@running =
{}
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#pid ⇒ Object
Returns the value of attribute pid.
-
#stamp ⇒ Object
Returns the value of attribute stamp.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id
2 3 4 |
# File 'lib/sleuth/transaction.rb', line 2 def id @id end |
#name ⇒ Object
Returns the value of attribute name
2 3 4 |
# File 'lib/sleuth/transaction.rb', line 2 def name @name end |
#parent ⇒ Object
Returns the value of attribute parent
2 3 4 |
# File 'lib/sleuth/transaction.rb', line 2 def parent @parent end |
#pid ⇒ Object
Returns the value of attribute pid
2 3 4 |
# File 'lib/sleuth/transaction.rb', line 2 def pid @pid end |
#stamp ⇒ Object
Returns the value of attribute stamp
2 3 4 |
# File 'lib/sleuth/transaction.rb', line 2 def stamp @stamp end |
Class Method Details
.create(name, parent) ⇒ Object
6 7 8 9 |
# File 'lib/sleuth/transaction.rb', line 6 def self.create(name, parent) id = Sleuth.current_id running[id] = new(name, id, Time.now.to_i, Process.pid, parent) end |
Instance Method Details
#full_name ⇒ Object
11 12 13 |
# File 'lib/sleuth/transaction.rb', line 11 def full_name "#{name}-#{id}-#{stamp}-#{pid}" end |