Sha256: 335a7c3ece72fdd8ecdd1113a3f3d6e49b37b9054f7476db8699fba88eadf070

Contents?: true

Size: 911 Bytes

Versions: 18

Compression:

Stored size: 911 Bytes

Contents

class NewRelic::MetricParser::Client < NewRelic::MetricParser::MetricParser
  
  def measure
    segments[1]
  end
  
  def frontend?; measure == 'frontend'; end
  def backend?; measure == 'backend'; end
  def totaltime?; measure == 'totaltime'; end

  def all?
    segments[1].index('all') == 0
  end
  
  def operation
    all? ? 'All Operations' : segments[1].titleize.gsub(/(load|ready|time|end)$/,' \1')
  end
  
  def legend_name
    if frontend?
      "Browser Rendering and Asset Download"
    elsif backend?
      "Backend and Network"
    else
      segments[1..-1].join(" ")
    end
  end
  
  def platform
    segments[2]
  end
  
  def user_agent
    segments[3..-1].join(" ")
  end
  
  def platform_and_user_agent
    segments[2..-1].join(" ")
  end
  
  def developer_name
    name = segments[1].capitalize
    name << " (#{segments[2..-1].join(" ")})" if segments.length > 2
    name
  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/client.rb
newrelic_rpm-2.14.1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb
newrelic_rpm-2.13.4.rum6 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb
newrelic_rpm-2.14.0 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb
newrelic_rpm-2.13.4.rum5 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb
newrelic_rpm-2.13.6.beta2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb
newrelic_rpm-2.13.6.beta1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb
newrelic_rpm-2.13.4.rum4 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb
newrelic_rpm-2.13.5.beta4 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb
newrelic_rpm-2.13.5.beta3 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb
newrelic_rpm-2.13.5.beta2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb
newrelic_rpm-2.13.5.beta1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb
newrelic_rpm-2.13.4.eum3 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb
newrelic_rpm-2.13.4.eum2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb
newrelic_rpm-2.13.4.eum1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb
newrelic_rpm-2.13.4 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb
newrelic_rpm-2.13.3 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb
newrelic_rpm-2.13.3.beta vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb