Class: Txnap::Gap

Inherits:
Data
  • Object
show all
Defined in:
lib/txnap/report.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#afterObject (readonly)

Returns the value of attribute after

Returns:

  • (Object)

    the current value of after



10
11
12
# File 'lib/txnap/report.rb', line 10

def after
  @after
end

#beforeObject (readonly)

Returns the value of attribute before

Returns:

  • (Object)

    the current value of before



10
11
12
# File 'lib/txnap/report.rb', line 10

def before
  @before
end

#durationObject (readonly)

Returns the value of attribute duration

Returns:

  • (Object)

    the current value of duration



10
11
12
# File 'lib/txnap/report.rb', line 10

def duration
  @duration
end

#locksObject (readonly)

Returns the value of attribute locks

Returns:

  • (Object)

    the current value of locks



10
11
12
# File 'lib/txnap/report.rb', line 10

def locks
  @locks
end

Instance Method Details

#to_hObject



11
12
13
14
15
16
17
# File 'lib/txnap/report.rb', line 11

def to_h
  {
    duration_ms: duration * 1000.0,
    after: after&.to_h,
    before: before&.to_h
  }
end