Sha256: 8afc5db1e40bc30ba3226905696d2955e65da576755ed9ef305ed4183d62e64a

Contents?: true

Size: 771 Bytes

Versions: 18

Compression:

Stored size: 771 Bytes

Contents

class NewRelic::MetricParser::Database < NewRelic::MetricParser::MetricParser
  def is_database?; true; end
  
  def database
    segments[1]
  end
  
  def operation
    op = segments.last
    case
      when op == 'Join Table Columns'
        op.upcase 
      when op == 'all'
        op
    else
      op.split(' ').last.upcase
    end
  end
  
  def developer_name
    if segments.size == 3
      "#{database} - #{operation}"
    else
      operation
    end
  end
  
  def legend_name
    if all? 
      'Database'
    else
      super
    end
  end
  
  def tooltip_name
    if all?
      'all SQL execution'
    else
      super
    end
  end
  
  private
  def all?
    name == 'Database/all' || name == 'Database/allWeb' || name == 'Database/allOther'
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
newrelic_rpm-2.14.1.logging1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
newrelic_rpm-2.14.1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
newrelic_rpm-2.13.4.rum6 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
newrelic_rpm-2.14.0 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
newrelic_rpm-2.13.4.rum5 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
newrelic_rpm-2.13.6.beta2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
newrelic_rpm-2.13.6.beta1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
newrelic_rpm-2.13.4.rum4 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
newrelic_rpm-2.13.5.beta4 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
newrelic_rpm-2.13.5.beta3 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
newrelic_rpm-2.13.5.beta2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
newrelic_rpm-2.13.5.beta1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
newrelic_rpm-2.13.4.eum3 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
newrelic_rpm-2.13.4.eum2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
newrelic_rpm-2.13.4.eum1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
newrelic_rpm-2.13.4 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
newrelic_rpm-2.13.3 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb
newrelic_rpm-2.13.3.beta vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb