Class: RSpecTelemetry::Analyzer::QueryStat

Inherits:
Struct
  • Object
show all
Defined in:
lib/rspec_telemetry/analyzer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#countObject

Returns the value of attribute count

Returns:

  • (Object)

    the current value of count



26
27
28
# File 'lib/rspec_telemetry/analyzer.rb', line 26

def count
  @count
end

#in_factory_msObject

Returns the value of attribute in_factory_ms

Returns:

  • (Object)

    the current value of in_factory_ms



26
27
28
# File 'lib/rspec_telemetry/analyzer.rb', line 26

def in_factory_ms
  @in_factory_ms
end

#max_msObject

Returns the value of attribute max_ms

Returns:

  • (Object)

    the current value of max_ms



26
27
28
# File 'lib/rspec_telemetry/analyzer.rb', line 26

def max_ms
  @max_ms
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



26
27
28
# File 'lib/rspec_telemetry/analyzer.rb', line 26

def name
  @name
end

#total_msObject

Returns the value of attribute total_ms

Returns:

  • (Object)

    the current value of total_ms



26
27
28
# File 'lib/rspec_telemetry/analyzer.rb', line 26

def total_ms
  @total_ms
end

Instance Method Details

#avg_msObject



27
28
29
# File 'lib/rspec_telemetry/analyzer.rb', line 27

def avg_ms
  count.to_i.zero? ? 0.0 : total_ms / count
end