newrelic_rpm 3.3.2.beta1 → 3.3.2.beta2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of newrelic_rpm might be problematic. Click here for more details.

Files changed (33) hide show
  1. data/CHANGELOG +1 -0
  2. data/lib/new_relic/agent/agent.rb +4 -4
  3. data/lib/new_relic/agent/database.rb +2 -2
  4. data/lib/new_relic/agent/error_collector.rb +1 -1
  5. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +3 -3
  6. data/lib/new_relic/agent/instrumentation/metric_frame.rb +1 -1
  7. data/lib/new_relic/agent/stats_engine/samplers.rb +1 -1
  8. data/lib/new_relic/agent/worker_loop.rb +1 -1
  9. data/lib/new_relic/commands/deployments.rb +1 -1
  10. data/lib/new_relic/control/configuration.rb +1 -1
  11. data/lib/new_relic/control/frameworks/merb.rb +1 -1
  12. data/lib/new_relic/control/frameworks/rails.rb +4 -4
  13. data/lib/new_relic/control/frameworks/rails3.rb +1 -1
  14. data/lib/new_relic/control/instrumentation.rb +1 -1
  15. data/lib/new_relic/control/server_methods.rb +2 -2
  16. data/lib/new_relic/data_serialization.rb +2 -2
  17. data/lib/new_relic/local_environment.rb +23 -8
  18. data/lib/new_relic/recipes.rb +1 -1
  19. data/lib/new_relic/version.rb +1 -1
  20. data/newrelic_rpm.gemspec +25 -5
  21. data/test/active_record_fixtures.rb +3 -3
  22. data/test/fixtures/proc_cpuinfo.txt +575 -0
  23. data/test/new_relic/agent/database_test.rb +1 -1
  24. data/test/new_relic/agent/error_collector_test.rb +15 -15
  25. data/test/new_relic/agent/instrumentation/active_record_instrumentation_test.rb +2 -1
  26. data/test/new_relic/agent/method_tracer_test.rb +2 -2
  27. data/test/new_relic/agent/stats_engine_test.rb +2 -2
  28. data/test/new_relic/agent/transaction_sample_builder_test.rb +1 -1
  29. data/test/new_relic/agent/worker_loop_test.rb +1 -1
  30. data/test/new_relic/control/configuration_test.rb +12 -0
  31. data/test/new_relic/local_environment_test.rb +14 -1
  32. data/vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection.rb +5 -0
  33. metadata +5 -4
data/CHANGELOG CHANGED
@@ -3,6 +3,7 @@ v3.3.2
3
3
  * Fixes for obfuscation of PostgreSQL and SQLite queries
4
4
  * Fix for lost database connections when using a forking framework
5
5
  * Workaround for RedHat kernel bug which prevented blocking reads of /proc fs
6
+ * Do not trap signals when handling exceptions
6
7
 
7
8
  v3.3.1
8
9
  * improved Ruby 1.8.6 support
@@ -129,9 +129,9 @@ module NewRelic
129
129
  if options['exception']
130
130
  e = options['exception']
131
131
  elsif options['error_message']
132
- e = Exception.new options['error_message']
132
+ e = StandardError.new options['error_message']
133
133
  else
134
- e = Exception.new 'Unknown Error'
134
+ e = StandardError.new 'Unknown Error'
135
135
  end
136
136
  error_collector.notice_error e, :uri => options['uri'], :metric => metric
137
137
  end
@@ -538,7 +538,7 @@ module NewRelic
538
538
  handle_force_disconnect(e)
539
539
  rescue NewRelic::Agent::ServerConnectionException => e
540
540
  handle_server_connection_problem(e)
541
- rescue Exception => e
541
+ rescue => e
542
542
  handle_other_error(e)
543
543
  end
544
544
 
@@ -1281,7 +1281,7 @@ module NewRelic
1281
1281
  log.debug "Serializing agent data to disk"
1282
1282
  NewRelic::Agent.save_data
1283
1283
  end
1284
- rescue Exception => e
1284
+ rescue => e
1285
1285
  NewRelic::Control.instance.disable_serialization = true
1286
1286
  NewRelic::Control.instance.log.warn("Disabling serialization: #{e.message}")
1287
1287
  retry_count ||= 0
@@ -95,12 +95,12 @@ module NewRelic
95
95
 
96
96
  def handle_exception_in_explain
97
97
  yield
98
- rescue Exception => e
98
+ rescue => e
99
99
  begin
100
100
  # guarantees no throw from explain_sql
101
101
  NewRelic::Control.instance.log.error("Error getting query plan: #{e.message}")
102
102
  NewRelic::Control.instance.log.debug(e.backtrace.join("\n"))
103
- rescue Exception
103
+ rescue
104
104
  # double exception. throw up your hands
105
105
  end
106
106
  end
@@ -223,7 +223,7 @@ module NewRelic
223
223
  exception_options = error_params_from_options(options).merge(exception_info(exception))
224
224
  add_to_error_queue(NewRelic::NoticedError.new(action_path, exception_options, exception))
225
225
  exception
226
- rescue Exception => e
226
+ rescue => e
227
227
  log.error("Error capturing an error, yodawg. #{e}")
228
228
  end
229
229
 
@@ -256,7 +256,7 @@ module NewRelic
256
256
  else
257
257
  perform_action_without_newrelic_trace(*args)
258
258
  end
259
- rescue Exception => e
259
+ rescue => e
260
260
  frame_data.notice_error(e)
261
261
  raise
262
262
  end
@@ -379,7 +379,7 @@ module NewRelic
379
379
  end
380
380
  unless path = options[:path]
381
381
  action = options[:name] || args.first
382
- metric_class = options[:class_name] || (self.is_a?(Class) ? self.name : self.class.name)
382
+ metric_class = options[:class_name] || ((self.is_a?(Class)||self.is_a?(Module)) ? self.name : self.class.name)
383
383
  path = metric_class
384
384
  path += ('/' + action) if action
385
385
  end
@@ -425,7 +425,7 @@ module NewRelic
425
425
  queue_start = parse_frontend_headers(newrelic_request_headers)
426
426
  end
427
427
  queue_start || now
428
- rescue Exception => e
428
+ rescue => e
429
429
  NewRelic::Control.instance.log.error("Error detecting upstream wait time: #{e}")
430
430
  NewRelic::Control.instance.log.debug("#{e.backtrace[0..20]}")
431
431
  now
@@ -67,7 +67,7 @@ module NewRelic
67
67
  include_class 'java.lang.management.ManagementFactory'
68
68
  include_class 'com.sun.management.OperatingSystemMXBean'
69
69
  @@java_classes_loaded = true
70
- rescue Exception => e
70
+ rescue => e
71
71
  end
72
72
  end
73
73
 
@@ -74,7 +74,7 @@ module Agent
74
74
  begin
75
75
  sampled_item.poll
76
76
  false # it's okay. don't delete it.
77
- rescue Exception => e
77
+ rescue => e
78
78
  log.error "Removing #{sampled_item} from list"
79
79
  log.error e
80
80
  log.debug e.backtrace.to_s
@@ -74,7 +74,7 @@ module NewRelic
74
74
  # Want to ignore these because they are handled already
75
75
  rescue SystemExit, NoMemoryError, SignalException
76
76
  raise
77
- rescue Exception => e
77
+ rescue => e
78
78
  # Don't blow out the stack for anything that hasn't already propagated
79
79
  log.error "Error running task in Agent Worker Loop '#{e}': #{e.backtrace.first}"
80
80
  log.debug e.backtrace.join("\n")
@@ -72,7 +72,7 @@ class NewRelic::Command::Deployments < NewRelic::Command
72
72
  raise NewRelic::Command::CommandFailure.new(err_string)
73
73
  rescue NewRelic::Command::CommandFailure
74
74
  raise
75
- rescue Exception => e
75
+ rescue => e
76
76
  err "Unexpected error attempting to connect to #{config.api_server}"
77
77
  info "#{e}: #{e.backtrace.join("\n ")}"
78
78
  raise NewRelic::Command::CommandFailure.new(e.to_s)
@@ -119,7 +119,7 @@ module NewRelic
119
119
  end
120
120
 
121
121
  def disable_serialization?
122
- fetch('disable_serialization', false)
122
+ fetch('disable_serialization', !DependencyDetection.installed?(:resque))
123
123
  end
124
124
  def disable_serialization=(b)
125
125
  self['disable_serialization'] = b
@@ -13,7 +13,7 @@ module NewRelic
13
13
 
14
14
  def to_stdout(msg)
15
15
  Merb.logger.info("NewRelic ~ " + msg)
16
- rescue Exception => e
16
+ rescue => e
17
17
  STDOUT.puts "NewRelic ~ " + msg
18
18
  end
19
19
 
@@ -57,7 +57,7 @@ module NewRelic
57
57
  require 'new_relic/rack/browser_monitoring'
58
58
  config.middleware.use NewRelic::Rack::BrowserMonitoring
59
59
  log!("Installed New Relic Browser Monitoring middleware", :info)
60
- rescue Exception => e
60
+ rescue => e
61
61
  log!("Error installing New Relic Browser Monitoring middleware: #{e.inspect}", :error)
62
62
  end
63
63
  end
@@ -77,7 +77,7 @@ module NewRelic
77
77
  log!("NewRelic Agent Developer Mode enabled.")
78
78
  log!("To view performance information, go to http://localhost#{port}/newrelic")
79
79
  end
80
- rescue Exception => e
80
+ rescue => e
81
81
  log!("Error installing New Relic Developer Mode: #{e.inspect}", :error)
82
82
  end
83
83
  elsif rails_config
@@ -92,14 +92,14 @@ module NewRelic
92
92
  else
93
93
  super
94
94
  end
95
- rescue Exception => e
95
+ rescue => e
96
96
  super
97
97
  end
98
98
 
99
99
  def to_stdout(message)
100
100
  logger = ::Rails.respond_to?(:logger) ? ::Rails.logger : ::RAILS_DEFAULT_LOGGER
101
101
  logger.info(message)
102
- rescue Exception => e
102
+ rescue => e
103
103
  super
104
104
  end
105
105
 
@@ -37,7 +37,7 @@ module NewRelic
37
37
  else
38
38
  super
39
39
  end
40
- rescue Exception => e
40
+ rescue => e
41
41
  super
42
42
  end
43
43
 
@@ -17,7 +17,7 @@ module NewRelic
17
17
  begin
18
18
  log.debug "Processing instrumentation file '#{file}'"
19
19
  require file.to_s
20
- rescue Exception => e
20
+ rescue => e
21
21
  log.error "Error loading instrumentation file '#{file}': #{e}"
22
22
  log.debug e.backtrace.join("\n")
23
23
  end
@@ -63,13 +63,13 @@ module NewRelic
63
63
  # address and don't have a good default.
64
64
  def resolve_ip_address(host)
65
65
  Resolv.getaddress(host)
66
- rescue Exception => e
66
+ rescue => e
67
67
  log.warn("DNS Error caching IP address: #{e}")
68
68
  log.debug(e.backtrace.join("\n "))
69
69
  begin
70
70
  log.info("Trying native DNS lookup since Resolv failed")
71
71
  IPSocket.getaddress(host)
72
- rescue Exception => e
72
+ rescue => e
73
73
  log.error("Could not look up server address: #{e}")
74
74
  nil
75
75
  end
@@ -16,7 +16,7 @@ module NewRelic
16
16
  NewRelic::Control.instance.disable_serialization? || store_too_large? ||
17
17
  store_too_old? || pid_too_old? ||
18
18
  NewRelic::LanguageSupport.using_version?('1.8.6')
19
- rescue Exception => e
19
+ rescue => e
20
20
  NewRelic::Control.instance.disable_serialization = true
21
21
  NewRelic::Control.instance.log.warn("Disabling serialization: #{e.message}")
22
22
  true
@@ -81,7 +81,7 @@ module NewRelic
81
81
  f.flock(File::LOCK_UN)
82
82
  end
83
83
  end
84
- rescue Exception => e
84
+ rescue => e
85
85
  NewRelic::Control.instance.log.error("Error serializing data to disk: #{e.inspect}")
86
86
  NewRelic::Control.instance.log.debug(e.backtrace.split("\n"))
87
87
  # re-raise so that serialization will be disabled higher up the stack
@@ -49,7 +49,7 @@ module NewRelic
49
49
  def append_environment_value(name, value = nil)
50
50
  value = yield if block_given?
51
51
  @config[name] = value if value
52
- rescue Exception
52
+ rescue
53
53
  # puts "#{e}\n #{e.backtrace.join("\n ")}"
54
54
  raise if @framework == :test
55
55
  end
@@ -58,7 +58,7 @@ module NewRelic
58
58
  # of gems - this catches errors that might be raised in the block
59
59
  def append_gem_list
60
60
  @gems += yield
61
- rescue Exception => e
61
+ rescue => e
62
62
  # puts "#{e}\n #{e.backtrace.join("\n ")}"
63
63
  raise if @framework == :test
64
64
  end
@@ -67,7 +67,7 @@ module NewRelic
67
67
  # of plugins - this catches errors that might be raised in the block
68
68
  def append_plugin_list
69
69
  @plugins += yield
70
- rescue Exception
70
+ rescue
71
71
  # puts "#{e}\n #{e.backtrace.join("\n ")}"
72
72
  raise if @framework == :test
73
73
  end
@@ -103,13 +103,28 @@ module NewRelic
103
103
  end
104
104
 
105
105
  # See what the number of cpus is, works only on some linux variants
106
- def gather_cpu_info
107
- return unless File.readable? '/proc/cpuinfo'
106
+ def gather_cpu_info(proc_file='/proc/cpuinfo')
107
+ return unless File.readable? proc_file
108
108
  @processors = append_environment_value('Processors') do
109
- cpuinfo = File.open("/proc/cpuinfo") {|f| f.read_nonblock(4096).strip }
109
+ cpuinfo = ''
110
+ File.open(proc_file) do |f|
111
+ loop do
112
+ begin
113
+ cpuinfo << f.read_nonblock(4096).strip
114
+ rescue EOFError
115
+ break
116
+ rescue Errno::EWOULDBLOCK, Errno::EAGAIN
117
+ cpuinfo = ''
118
+ break # don't select file handle, just give up
119
+ end
120
+ end
121
+ end
110
122
  processors = cpuinfo.split("\n").select {|line| line =~ /^processor\s*:/ }.size
111
-
112
- raise "Cannot determine the number of processors in /proc/cpuinfo" unless processors > 0
123
+
124
+ if processors == 0
125
+ processors = 1 # assume there is at least one processor
126
+ NewRelic::Agent.logger.warn("Cannot determine the number of processors in #{proc_file}")
127
+ end
113
128
  processors
114
129
  end
115
130
  end
@@ -54,7 +54,7 @@ make_notify_task = Proc.new do
54
54
  logger.info e.message
55
55
  rescue Capistrano::CommandError
56
56
  logger.info "Unable to notify New Relic of the deployment... skipping"
57
- rescue Exception => e
57
+ rescue => e
58
58
  logger.info "Error creating New Relic deployment (#{e})\n#{e.backtrace.join("\n")}"
59
59
  end
60
60
  # WIP: For rollbacks, let's update the deployment we created with an indication of the failure:
@@ -4,7 +4,7 @@ module NewRelic
4
4
  MAJOR = 3
5
5
  MINOR = 3
6
6
  TINY = 2
7
- BUILD = 'beta1' # Set to nil for a release, 'beta1', 'alpha', etc for prerelease builds
7
+ BUILD = 'beta2' # Set to nil for a release, 'beta1', 'alpha', etc for prerelease builds
8
8
  STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
9
9
  end
10
10
 
data/newrelic_rpm.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{newrelic_rpm}
8
- s.version = "3.3.2.beta1"
8
+ s.version = "3.3.2.beta2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Bill Kayser", "Jon Guymon", "Justin George", "Darin Swanson"]
12
- s.date = %q{2012-01-20}
12
+ s.date = %q{2012-02-10}
13
13
  s.description = %q{New Relic is a performance management system, developed by New Relic,
14
14
  Inc (http://www.newrelic.com). New Relic provides you with deep
15
15
  information about the performance of your web application as it runs
@@ -140,6 +140,7 @@ http://github.com/newrelic/rpm/
140
140
  "test/active_record_fixtures.rb",
141
141
  "test/config/newrelic.yml",
142
142
  "test/config/test_control.rb",
143
+ "test/fixtures/proc_cpuinfo.txt",
143
144
  "test/new_relic/agent/agent/connect_test.rb",
144
145
  "test/new_relic/agent/agent/start_test.rb",
145
146
  "test/new_relic/agent/agent/start_worker_thread_test.rb",
@@ -285,9 +286,28 @@ http://github.com/newrelic/rpm/
285
286
  "vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_service.rb",
286
287
  "vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_transaction.rb"
287
288
  ]
288
- s.rubygems_version = %q{1.3.6}
289
- s.homepage = "http://www.github.com/newrelic/rpm"
290
- s.post_install_message = "\nPLEASE NOTE:\n\nDeveloper Mode is now a Rack middleware.\n\nDeveloper Mode is no longer available in Rails 2.1 and earlier.\nHowever, starting in version 2.12 you can use Developer Mode in any\nRack based framework, in addition to Rails. To install developer mode\nin a non-Rails application, just add NewRelic::Rack::DeveloperMode to\nyour middleware stack.\n\nIf you are using JRuby, we recommend using at least version 1.4 or \nlater because of issues with the implementation of the timeout library.\n\nRefer to the README.md file for more information.\n\nPlease see http://github.com/newrelic/rpm/blob/master/CHANGELOG\nfor a complete description of the features and enhancements available\nin version 3.3 of the Ruby Agent.\n \n"
289
+ s.homepage = %q{http://www.github.com/newrelic/rpm}
290
+ s.post_install_message = %q{
291
+ PLEASE NOTE:
292
+
293
+ Developer Mode is now a Rack middleware.
294
+
295
+ Developer Mode is no longer available in Rails 2.1 and earlier.
296
+ However, starting in version 2.12 you can use Developer Mode in any
297
+ Rack based framework, in addition to Rails. To install developer mode
298
+ in a non-Rails application, just add NewRelic::Rack::DeveloperMode to
299
+ your middleware stack.
300
+
301
+ If you are using JRuby, we recommend using at least version 1.4 or
302
+ later because of issues with the implementation of the timeout library.
303
+
304
+ Refer to the README.md file for more information.
305
+
306
+ Please see http://github.com/newrelic/rpm/blob/master/CHANGELOG
307
+ for a complete description of the features and enhancements available
308
+ in version 3.3 of the Ruby Agent.
309
+
310
+ }
291
311
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "New Relic Ruby Agent"]
292
312
  s.require_paths = ["lib"]
293
313
  s.summary = "New Relic Ruby Agent"
@@ -12,7 +12,7 @@ module ActiveRecordFixtures
12
12
  ActiveRecordFixtures::Order.teardown
13
13
  begin
14
14
  super
15
- rescue Exception => e
15
+ rescue => e
16
16
  end
17
17
  end
18
18
  class Order < ActiveRecord::Base
@@ -30,7 +30,7 @@ module ActiveRecordFixtures
30
30
 
31
31
  def self.check_for_table
32
32
  connection.table_exists?(self.table_name)
33
- rescue Exception => e
33
+ rescue => e
34
34
  false
35
35
  end
36
36
 
@@ -66,7 +66,7 @@ module ActiveRecordFixtures
66
66
  end
67
67
  def self.check_for_table
68
68
  connection.table_exists?(self.table_name) && connection.table_exists?('orders_shipments')
69
- rescue Exception => e
69
+ rescue => e
70
70
  false
71
71
  end
72
72
 
@@ -0,0 +1,575 @@
1
+ processor : 0
2
+ vendor_id : GenuineIntel
3
+ cpu family : 6
4
+ model : 44
5
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
6
+ stepping : 2
7
+ cpu MHz : 2660.090
8
+ cache size : 12288 KB
9
+ physical id : 1
10
+ siblings : 12
11
+ core id : 0
12
+ cpu cores : 6
13
+ apicid : 32
14
+ fpu : yes
15
+ fpu_exception : yes
16
+ cpuid level : 11
17
+ wp : yes
18
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
19
+ bogomips : 5320.18
20
+ clflush size : 64
21
+ cache_alignment : 64
22
+ address sizes : 40 bits physical, 48 bits virtual
23
+ power management: [8]
24
+
25
+ processor : 1
26
+ vendor_id : GenuineIntel
27
+ cpu family : 6
28
+ model : 44
29
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
30
+ stepping : 2
31
+ cpu MHz : 2660.090
32
+ cache size : 12288 KB
33
+ physical id : 0
34
+ siblings : 12
35
+ core id : 0
36
+ cpu cores : 6
37
+ apicid : 0
38
+ fpu : yes
39
+ fpu_exception : yes
40
+ cpuid level : 11
41
+ wp : yes
42
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
43
+ bogomips : 5320.05
44
+ clflush size : 64
45
+ cache_alignment : 64
46
+ address sizes : 40 bits physical, 48 bits virtual
47
+ power management: [8]
48
+
49
+ processor : 2
50
+ vendor_id : GenuineIntel
51
+ cpu family : 6
52
+ model : 44
53
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
54
+ stepping : 2
55
+ cpu MHz : 2660.090
56
+ cache size : 12288 KB
57
+ physical id : 1
58
+ siblings : 12
59
+ core id : 1
60
+ cpu cores : 6
61
+ apicid : 34
62
+ fpu : yes
63
+ fpu_exception : yes
64
+ cpuid level : 11
65
+ wp : yes
66
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
67
+ bogomips : 5320.02
68
+ clflush size : 64
69
+ cache_alignment : 64
70
+ address sizes : 40 bits physical, 48 bits virtual
71
+ power management: [8]
72
+
73
+ processor : 3
74
+ vendor_id : GenuineIntel
75
+ cpu family : 6
76
+ model : 44
77
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
78
+ stepping : 2
79
+ cpu MHz : 2660.090
80
+ cache size : 12288 KB
81
+ physical id : 0
82
+ siblings : 12
83
+ core id : 1
84
+ cpu cores : 6
85
+ apicid : 2
86
+ fpu : yes
87
+ fpu_exception : yes
88
+ cpuid level : 11
89
+ wp : yes
90
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
91
+ bogomips : 5320.05
92
+ clflush size : 64
93
+ cache_alignment : 64
94
+ address sizes : 40 bits physical, 48 bits virtual
95
+ power management: [8]
96
+
97
+ processor : 4
98
+ vendor_id : GenuineIntel
99
+ cpu family : 6
100
+ model : 44
101
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
102
+ stepping : 2
103
+ cpu MHz : 2660.090
104
+ cache size : 12288 KB
105
+ physical id : 1
106
+ siblings : 12
107
+ core id : 2
108
+ cpu cores : 6
109
+ apicid : 36
110
+ fpu : yes
111
+ fpu_exception : yes
112
+ cpuid level : 11
113
+ wp : yes
114
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
115
+ bogomips : 5319.95
116
+ clflush size : 64
117
+ cache_alignment : 64
118
+ address sizes : 40 bits physical, 48 bits virtual
119
+ power management: [8]
120
+
121
+ processor : 5
122
+ vendor_id : GenuineIntel
123
+ cpu family : 6
124
+ model : 44
125
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
126
+ stepping : 2
127
+ cpu MHz : 2660.090
128
+ cache size : 12288 KB
129
+ physical id : 0
130
+ siblings : 12
131
+ core id : 2
132
+ cpu cores : 6
133
+ apicid : 4
134
+ fpu : yes
135
+ fpu_exception : yes
136
+ cpuid level : 11
137
+ wp : yes
138
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
139
+ bogomips : 5320.06
140
+ clflush size : 64
141
+ cache_alignment : 64
142
+ address sizes : 40 bits physical, 48 bits virtual
143
+ power management: [8]
144
+
145
+ processor : 6
146
+ vendor_id : GenuineIntel
147
+ cpu family : 6
148
+ model : 44
149
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
150
+ stepping : 2
151
+ cpu MHz : 2660.090
152
+ cache size : 12288 KB
153
+ physical id : 1
154
+ siblings : 12
155
+ core id : 8
156
+ cpu cores : 6
157
+ apicid : 48
158
+ fpu : yes
159
+ fpu_exception : yes
160
+ cpuid level : 11
161
+ wp : yes
162
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
163
+ bogomips : 5320.02
164
+ clflush size : 64
165
+ cache_alignment : 64
166
+ address sizes : 40 bits physical, 48 bits virtual
167
+ power management: [8]
168
+
169
+ processor : 7
170
+ vendor_id : GenuineIntel
171
+ cpu family : 6
172
+ model : 44
173
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
174
+ stepping : 2
175
+ cpu MHz : 2660.090
176
+ cache size : 12288 KB
177
+ physical id : 0
178
+ siblings : 12
179
+ core id : 8
180
+ cpu cores : 6
181
+ apicid : 16
182
+ fpu : yes
183
+ fpu_exception : yes
184
+ cpuid level : 11
185
+ wp : yes
186
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
187
+ bogomips : 5319.98
188
+ clflush size : 64
189
+ cache_alignment : 64
190
+ address sizes : 40 bits physical, 48 bits virtual
191
+ power management: [8]
192
+
193
+ processor : 8
194
+ vendor_id : GenuineIntel
195
+ cpu family : 6
196
+ model : 44
197
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
198
+ stepping : 2
199
+ cpu MHz : 2660.090
200
+ cache size : 12288 KB
201
+ physical id : 1
202
+ siblings : 12
203
+ core id : 9
204
+ cpu cores : 6
205
+ apicid : 50
206
+ fpu : yes
207
+ fpu_exception : yes
208
+ cpuid level : 11
209
+ wp : yes
210
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
211
+ bogomips : 5320.02
212
+ clflush size : 64
213
+ cache_alignment : 64
214
+ address sizes : 40 bits physical, 48 bits virtual
215
+ power management: [8]
216
+
217
+ processor : 9
218
+ vendor_id : GenuineIntel
219
+ cpu family : 6
220
+ model : 44
221
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
222
+ stepping : 2
223
+ cpu MHz : 2660.090
224
+ cache size : 12288 KB
225
+ physical id : 0
226
+ siblings : 12
227
+ core id : 9
228
+ cpu cores : 6
229
+ apicid : 18
230
+ fpu : yes
231
+ fpu_exception : yes
232
+ cpuid level : 11
233
+ wp : yes
234
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
235
+ bogomips : 5319.99
236
+ clflush size : 64
237
+ cache_alignment : 64
238
+ address sizes : 40 bits physical, 48 bits virtual
239
+ power management: [8]
240
+
241
+ processor : 10
242
+ vendor_id : GenuineIntel
243
+ cpu family : 6
244
+ model : 44
245
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
246
+ stepping : 2
247
+ cpu MHz : 2660.090
248
+ cache size : 12288 KB
249
+ physical id : 1
250
+ siblings : 12
251
+ core id : 10
252
+ cpu cores : 6
253
+ apicid : 52
254
+ fpu : yes
255
+ fpu_exception : yes
256
+ cpuid level : 11
257
+ wp : yes
258
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
259
+ bogomips : 5320.02
260
+ clflush size : 64
261
+ cache_alignment : 64
262
+ address sizes : 40 bits physical, 48 bits virtual
263
+ power management: [8]
264
+
265
+ processor : 11
266
+ vendor_id : GenuineIntel
267
+ cpu family : 6
268
+ model : 44
269
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
270
+ stepping : 2
271
+ cpu MHz : 2660.090
272
+ cache size : 12288 KB
273
+ physical id : 0
274
+ siblings : 12
275
+ core id : 10
276
+ cpu cores : 6
277
+ apicid : 20
278
+ fpu : yes
279
+ fpu_exception : yes
280
+ cpuid level : 11
281
+ wp : yes
282
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
283
+ bogomips : 5320.02
284
+ clflush size : 64
285
+ cache_alignment : 64
286
+ address sizes : 40 bits physical, 48 bits virtual
287
+ power management: [8]
288
+
289
+ processor : 12
290
+ vendor_id : GenuineIntel
291
+ cpu family : 6
292
+ model : 44
293
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
294
+ stepping : 2
295
+ cpu MHz : 2660.090
296
+ cache size : 12288 KB
297
+ physical id : 1
298
+ siblings : 12
299
+ core id : 0
300
+ cpu cores : 6
301
+ apicid : 33
302
+ fpu : yes
303
+ fpu_exception : yes
304
+ cpuid level : 11
305
+ wp : yes
306
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
307
+ bogomips : 5319.94
308
+ clflush size : 64
309
+ cache_alignment : 64
310
+ address sizes : 40 bits physical, 48 bits virtual
311
+ power management: [8]
312
+
313
+ processor : 13
314
+ vendor_id : GenuineIntel
315
+ cpu family : 6
316
+ model : 44
317
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
318
+ stepping : 2
319
+ cpu MHz : 2660.090
320
+ cache size : 12288 KB
321
+ physical id : 0
322
+ siblings : 12
323
+ core id : 0
324
+ cpu cores : 6
325
+ apicid : 1
326
+ fpu : yes
327
+ fpu_exception : yes
328
+ cpuid level : 11
329
+ wp : yes
330
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
331
+ bogomips : 5320.05
332
+ clflush size : 64
333
+ cache_alignment : 64
334
+ address sizes : 40 bits physical, 48 bits virtual
335
+ power management: [8]
336
+
337
+ processor : 14
338
+ vendor_id : GenuineIntel
339
+ cpu family : 6
340
+ model : 44
341
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
342
+ stepping : 2
343
+ cpu MHz : 2660.090
344
+ cache size : 12288 KB
345
+ physical id : 1
346
+ siblings : 12
347
+ core id : 1
348
+ cpu cores : 6
349
+ apicid : 35
350
+ fpu : yes
351
+ fpu_exception : yes
352
+ cpuid level : 11
353
+ wp : yes
354
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
355
+ bogomips : 5320.02
356
+ clflush size : 64
357
+ cache_alignment : 64
358
+ address sizes : 40 bits physical, 48 bits virtual
359
+ power management: [8]
360
+
361
+ processor : 15
362
+ vendor_id : GenuineIntel
363
+ cpu family : 6
364
+ model : 44
365
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
366
+ stepping : 2
367
+ cpu MHz : 2660.090
368
+ cache size : 12288 KB
369
+ physical id : 0
370
+ siblings : 12
371
+ core id : 1
372
+ cpu cores : 6
373
+ apicid : 3
374
+ fpu : yes
375
+ fpu_exception : yes
376
+ cpuid level : 11
377
+ wp : yes
378
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
379
+ bogomips : 5320.05
380
+ clflush size : 64
381
+ cache_alignment : 64
382
+ address sizes : 40 bits physical, 48 bits virtual
383
+ power management: [8]
384
+
385
+ processor : 16
386
+ vendor_id : GenuineIntel
387
+ cpu family : 6
388
+ model : 44
389
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
390
+ stepping : 2
391
+ cpu MHz : 2660.090
392
+ cache size : 12288 KB
393
+ physical id : 1
394
+ siblings : 12
395
+ core id : 2
396
+ cpu cores : 6
397
+ apicid : 37
398
+ fpu : yes
399
+ fpu_exception : yes
400
+ cpuid level : 11
401
+ wp : yes
402
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
403
+ bogomips : 5320.02
404
+ clflush size : 64
405
+ cache_alignment : 64
406
+ address sizes : 40 bits physical, 48 bits virtual
407
+ power management: [8]
408
+
409
+ processor : 17
410
+ vendor_id : GenuineIntel
411
+ cpu family : 6
412
+ model : 44
413
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
414
+ stepping : 2
415
+ cpu MHz : 2660.090
416
+ cache size : 12288 KB
417
+ physical id : 0
418
+ siblings : 12
419
+ core id : 2
420
+ cpu cores : 6
421
+ apicid : 5
422
+ fpu : yes
423
+ fpu_exception : yes
424
+ cpuid level : 11
425
+ wp : yes
426
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
427
+ bogomips : 5320.05
428
+ clflush size : 64
429
+ cache_alignment : 64
430
+ address sizes : 40 bits physical, 48 bits virtual
431
+ power management: [8]
432
+
433
+ processor : 18
434
+ vendor_id : GenuineIntel
435
+ cpu family : 6
436
+ model : 44
437
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
438
+ stepping : 2
439
+ cpu MHz : 2660.090
440
+ cache size : 12288 KB
441
+ physical id : 1
442
+ siblings : 12
443
+ core id : 8
444
+ cpu cores : 6
445
+ apicid : 49
446
+ fpu : yes
447
+ fpu_exception : yes
448
+ cpuid level : 11
449
+ wp : yes
450
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
451
+ bogomips : 5330.86
452
+ clflush size : 64
453
+ cache_alignment : 64
454
+ address sizes : 40 bits physical, 48 bits virtual
455
+ power management: [8]
456
+
457
+ processor : 19
458
+ vendor_id : GenuineIntel
459
+ cpu family : 6
460
+ model : 44
461
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
462
+ stepping : 2
463
+ cpu MHz : 2660.090
464
+ cache size : 12288 KB
465
+ physical id : 0
466
+ siblings : 12
467
+ core id : 8
468
+ cpu cores : 6
469
+ apicid : 17
470
+ fpu : yes
471
+ fpu_exception : yes
472
+ cpuid level : 11
473
+ wp : yes
474
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
475
+ bogomips : 5320.05
476
+ clflush size : 64
477
+ cache_alignment : 64
478
+ address sizes : 40 bits physical, 48 bits virtual
479
+ power management: [8]
480
+
481
+ processor : 20
482
+ vendor_id : GenuineIntel
483
+ cpu family : 6
484
+ model : 44
485
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
486
+ stepping : 2
487
+ cpu MHz : 2660.090
488
+ cache size : 12288 KB
489
+ physical id : 1
490
+ siblings : 12
491
+ core id : 9
492
+ cpu cores : 6
493
+ apicid : 51
494
+ fpu : yes
495
+ fpu_exception : yes
496
+ cpuid level : 11
497
+ wp : yes
498
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
499
+ bogomips : 5320.02
500
+ clflush size : 64
501
+ cache_alignment : 64
502
+ address sizes : 40 bits physical, 48 bits virtual
503
+ power management: [8]
504
+
505
+ processor : 21
506
+ vendor_id : GenuineIntel
507
+ cpu family : 6
508
+ model : 44
509
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
510
+ stepping : 2
511
+ cpu MHz : 2660.090
512
+ cache size : 12288 KB
513
+ physical id : 0
514
+ siblings : 12
515
+ core id : 9
516
+ cpu cores : 6
517
+ apicid : 19
518
+ fpu : yes
519
+ fpu_exception : yes
520
+ cpuid level : 11
521
+ wp : yes
522
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
523
+ bogomips : 5320.01
524
+ clflush size : 64
525
+ cache_alignment : 64
526
+ address sizes : 40 bits physical, 48 bits virtual
527
+ power management: [8]
528
+
529
+ processor : 22
530
+ vendor_id : GenuineIntel
531
+ cpu family : 6
532
+ model : 44
533
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
534
+ stepping : 2
535
+ cpu MHz : 2660.090
536
+ cache size : 12288 KB
537
+ physical id : 1
538
+ siblings : 12
539
+ core id : 10
540
+ cpu cores : 6
541
+ apicid : 53
542
+ fpu : yes
543
+ fpu_exception : yes
544
+ cpuid level : 11
545
+ wp : yes
546
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
547
+ bogomips : 5320.05
548
+ clflush size : 64
549
+ cache_alignment : 64
550
+ address sizes : 40 bits physical, 48 bits virtual
551
+ power management: [8]
552
+
553
+ processor : 23
554
+ vendor_id : GenuineIntel
555
+ cpu family : 6
556
+ model : 44
557
+ model name : Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
558
+ stepping : 2
559
+ cpu MHz : 2660.090
560
+ cache size : 12288 KB
561
+ physical id : 0
562
+ siblings : 12
563
+ core id : 10
564
+ cpu cores : 6
565
+ apicid : 21
566
+ fpu : yes
567
+ fpu_exception : yes
568
+ cpuid level : 11
569
+ wp : yes
570
+ flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc arat pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm
571
+ bogomips : 5320.02
572
+ clflush size : 64
573
+ cache_alignment : 64
574
+ address sizes : 40 bits physical, 48 bits virtual
575
+ power management: [8]
@@ -74,7 +74,7 @@ class NewRelic::Agent::DatabaseTest < Test::Unit::TestCase
74
74
  end
75
75
 
76
76
  def test_handle_exception_in_explain
77
- fake_error = Exception.new('a message')
77
+ fake_error = StandardError.new('a message')
78
78
  NewRelic::Control.instance.log.expects(:error).with('Error getting query plan: a message')
79
79
  # backtrace can be basically any string, just should get logged
80
80
  NewRelic::Control.instance.log.expects(:debug).with(instance_of(String))
@@ -29,7 +29,7 @@ class NewRelic::Agent::ErrorCollectorTest < Test::Unit::TestCase
29
29
  end
30
30
 
31
31
  def test_simple
32
- @error_collector.notice_error(Exception.new("message"), :uri => '/myurl/', :metric => 'path', :referer => 'test_referer', :request_params => {:x => 'y'})
32
+ @error_collector.notice_error(StandardError.new("message"), :uri => '/myurl/', :metric => 'path', :referer => 'test_referer', :request_params => {:x => 'y'})
33
33
 
34
34
  old_errors = []
35
35
  errors = @error_collector.harvest_errors(old_errors)
@@ -42,7 +42,7 @@ class NewRelic::Agent::ErrorCollectorTest < Test::Unit::TestCase
42
42
  assert err.params[:request_uri] == '/myurl/'
43
43
  assert err.params[:request_referer] == "test_referer"
44
44
  assert err.path == 'path'
45
- assert err.exception_class == 'Exception'
45
+ assert err.exception_class == 'StandardError'
46
46
 
47
47
  # the collector should now return an empty array since nothing
48
48
  # has been added since its last harvest
@@ -53,7 +53,7 @@ class NewRelic::Agent::ErrorCollectorTest < Test::Unit::TestCase
53
53
  def test_long_message
54
54
  #yes, times 500. it's a 5000 byte string. Assuming strings are
55
55
  #still 1 byte / char.
56
- @error_collector.notice_error(Exception.new("1234567890" * 500), :uri => '/myurl/', :metric => 'path', :request_params => {:x => 'y'})
56
+ @error_collector.notice_error(StandardError.new("1234567890" * 500), :uri => '/myurl/', :metric => 'path', :request_params => {:x => 'y'})
57
57
 
58
58
  old_errors = []
59
59
  errors = @error_collector.harvest_errors(old_errors)
@@ -66,13 +66,13 @@ class NewRelic::Agent::ErrorCollectorTest < Test::Unit::TestCase
66
66
  end
67
67
 
68
68
  def test_collect_failover
69
- @error_collector.notice_error(Exception.new("message"), :metric => 'first', :request_params => {:x => 'y'})
69
+ @error_collector.notice_error(StandardError.new("message"), :metric => 'first', :request_params => {:x => 'y'})
70
70
 
71
71
  errors = @error_collector.harvest_errors([])
72
72
 
73
- @error_collector.notice_error(Exception.new("message"), :metric => 'second', :request_params => {:x => 'y'})
74
- @error_collector.notice_error(Exception.new("message"), :metric => 'path', :request_params => {:x => 'y'})
75
- @error_collector.notice_error(Exception.new("message"), :metric => 'last', :request_params => {:x => 'y'})
73
+ @error_collector.notice_error(StandardError.new("message"), :metric => 'second', :request_params => {:x => 'y'})
74
+ @error_collector.notice_error(StandardError.new("message"), :metric => 'path', :request_params => {:x => 'y'})
75
+ @error_collector.notice_error(StandardError.new("message"), :metric => 'last', :request_params => {:x => 'y'})
76
76
 
77
77
  errors = @error_collector.harvest_errors(errors)
78
78
 
@@ -80,8 +80,8 @@ class NewRelic::Agent::ErrorCollectorTest < Test::Unit::TestCase
80
80
  assert_equal 'first', errors.first.path
81
81
  assert_equal 'last', errors.last.path
82
82
 
83
- @error_collector.notice_error(Exception.new("message"), :metric => 'first', :request_params => {:x => 'y'})
84
- @error_collector.notice_error(Exception.new("message"), :metric => 'last', :request_params => {:x => 'y'})
83
+ @error_collector.notice_error(StandardError.new("message"), :metric => 'first', :request_params => {:x => 'y'})
84
+ @error_collector.notice_error(StandardError.new("message"), :metric => 'last', :request_params => {:x => 'y'})
85
85
 
86
86
  errors = @error_collector.harvest_errors(nil)
87
87
  assert_equal 2, errors.length
@@ -95,7 +95,7 @@ class NewRelic::Agent::ErrorCollectorTest < Test::Unit::TestCase
95
95
 
96
96
  silence_stream(::STDOUT) do
97
97
  (max_q_length + 5).times do |n|
98
- @error_collector.notice_error(Exception.new("exception #{n}"), :metric => "path", :request_params => {:x => n})
98
+ @error_collector.notice_error(StandardError.new("exception #{n}"), :metric => "path", :request_params => {:x => n})
99
99
  end
100
100
  end
101
101
 
@@ -120,13 +120,13 @@ class NewRelic::Agent::ErrorCollectorTest < Test::Unit::TestCase
120
120
  [1.1, '1.1'],
121
121
  ['hi', 'hi'],
122
122
  [:hi, :hi],
123
- [Exception.new("test"), "#<Exception>"],
123
+ [StandardError.new("test"), "#<StandardError>"],
124
124
  [TestClass.new, "#<NewRelic::Agent::ErrorCollectorTest::TestClass>"]
125
125
  ]
126
126
 
127
127
 
128
128
  types.each do |test|
129
- @error_collector.notice_error(Exception.new("message"), :metric => 'path', :request_params => {:x => test[0]})
129
+ @error_collector.notice_error(StandardError.new("message"), :metric => 'path', :request_params => {:x => test[0]})
130
130
 
131
131
  assert_equal test[1], @error_collector.harvest_errors([])[0].params[:request_params][:x]
132
132
  end
@@ -148,7 +148,7 @@ class NewRelic::Agent::ErrorCollectorTest < Test::Unit::TestCase
148
148
  @error_collector.ignore_error_filter &wrapped_filter_proc
149
149
 
150
150
  @error_collector.notice_error(IOError.new("message"), :metric => 'path', :request_params => {:x => 'y'})
151
- @error_collector.notice_error(Exception.new("message"), :metric => 'path', :request_params => {:x => 'y'})
151
+ @error_collector.notice_error(StandardError.new("message"), :metric => 'path', :request_params => {:x => 'y'})
152
152
 
153
153
  errors = @error_collector.harvest_errors([])
154
154
 
@@ -158,8 +158,8 @@ class NewRelic::Agent::ErrorCollectorTest < Test::Unit::TestCase
158
158
  def test_obfuscates_error_messages_when_high_security_is_set
159
159
  NewRelic::Control.instance['high_security'] = true
160
160
 
161
- @error_collector.notice_error(Exception.new("YO SQL BAD: serect * flom test where foo = 'bar'"))
162
- @error_collector.notice_error(Exception.new("YO SQL BAD: serect * flom test where foo in (1,2,3,4,5)"))
161
+ @error_collector.notice_error(StandardError.new("YO SQL BAD: serect * flom test where foo = 'bar'"))
162
+ @error_collector.notice_error(StandardError.new("YO SQL BAD: serect * flom test where foo in (1,2,3,4,5)"))
163
163
 
164
164
  old_errors = []
165
165
  errors = @error_collector.harvest_errors([])
@@ -10,7 +10,7 @@ class NewRelic::Agent::Instrumentation::ActiveRecordInstrumentationTest < Test::
10
10
  ActiveRecordFixtures.setup
11
11
  NewRelic::Agent.instance.transaction_sampler.reset!
12
12
  NewRelic::Agent.instance.stats_engine.clear_stats
13
- rescue Exception => e
13
+ rescue => e
14
14
  puts e
15
15
  puts e.backtrace.join("\n")
16
16
  end
@@ -186,6 +186,7 @@ class NewRelic::Agent::Instrumentation::ActiveRecordInstrumentationTest < Test::
186
186
  ActiveRecord/ActiveRecordFixtures::Order/destroy
187
187
  Database/SQL/insert
188
188
  Database/SQL/delete
189
+ Database/SQL/show
189
190
  ActiveRecord/find
190
191
  ActiveRecord/ActiveRecordFixtures::Order/find
191
192
  ActiveRecord/ActiveRecordFixtures::Shipment/find
@@ -309,11 +309,11 @@ class NewRelic::Agent::MethodTracerTest < Test::Unit::TestCase
309
309
  metric = "hey"
310
310
  self.class.trace_execution_scoped metric do
311
311
  assert @stats_engine.peek_scope.name == metric
312
- throw Exception.new
312
+ throw StandardError.new
313
313
  end
314
314
 
315
315
  assert false # should never get here
316
- rescue Exception
316
+ rescue StandardError
317
317
  # make sure the scope gets popped
318
318
  assert @stats_engine.peek_scope == nil
319
319
  end
@@ -179,7 +179,7 @@ class NewRelic::Agent::StatsEngineTest < Test::Unit::TestCase
179
179
 
180
180
 
181
181
  def test_collect_gc_data
182
- GC.disable
182
+ GC.disable unless NewRelic::LanguageSupport.using_engine?('jruby')
183
183
  if NewRelic::LanguageSupport.using_engine?('rbx')
184
184
  agent = ::Rubinius::Agent.loopback
185
185
  agent.stubs(:get).with('system.gc.young.total_wallclock') \
@@ -210,7 +210,7 @@ class NewRelic::Agent::StatsEngineTest < Test::Unit::TestCase
210
210
  assert_equal 2, gc_stats.call_count
211
211
  assert_equal 3.0, gc_stats.total_call_time
212
212
  ensure
213
- GC.enable
213
+ GC.enable unless NewRelic::LanguageSupport.using_engine?('jruby')
214
214
  end
215
215
 
216
216
  private
@@ -42,7 +42,7 @@ class NewRelic::Agent::TransationSampleBuilderTest < Test::Unit::TestCase
42
42
  begin
43
43
  builder.sample
44
44
  assert false
45
- rescue Exception => e
45
+ rescue => e
46
46
  # expected
47
47
  end
48
48
 
@@ -45,7 +45,7 @@ class NewRelic::Agent::WorkerLoopTest < Test::Unit::TestCase
45
45
  end
46
46
  assert done
47
47
  end
48
- class BadBoy < Exception; end
48
+ class BadBoy < StandardError; end
49
49
 
50
50
  def test_task_error__exception
51
51
  @logger.expects(:error).once
@@ -69,4 +69,16 @@ class NewRelic::Control::ConfigurationTest < Test::Unit::TestCase
69
69
 
70
70
  NewRelic::Control.instance['browser_monitoring'] = { 'auto_instrument' => true }
71
71
  end
72
+
73
+ def test_data_serialization_default_off
74
+ DependencyDetection.send(:class_variable_set, '@@items', [])
75
+ assert NewRelic::Control.instance.disable_serialization?
76
+ end
77
+
78
+ def test_data_serialization_default_on_when_using_resque
79
+ DependencyDetection.defer { @name = :resque }
80
+ DependencyDetection.dependency_by_name(:resque).executed!
81
+ assert !NewRelic::Control.instance.disable_serialization?
82
+ DependencyDetection.send(:class_variable_set, '@@items', [])
83
+ end
72
84
  end
@@ -46,6 +46,7 @@ class NewRelic::LocalEnvironmentTest < Test::Unit::TestCase
46
46
 
47
47
  ::Passenger.class_eval { remove_const :AbstractServer }
48
48
  end
49
+
49
50
  def test_snapshot
50
51
  e = NewRelic::LocalEnvironment.new
51
52
  s = e.snapshot
@@ -60,6 +61,19 @@ class NewRelic::LocalEnvironmentTest < Test::Unit::TestCase
60
61
  end
61
62
  end
62
63
 
64
+ def test_gather_cpu_info_successful
65
+ e = NewRelic::LocalEnvironment.new
66
+ e.gather_cpu_info(File.expand_path(File.join(File.dirname(__FILE__),'..', 'fixtures', 'proc_cpuinfo.txt')))
67
+ s = e.snapshot
68
+ assert_equal 24, s.assoc('Processors').last.to_i
69
+ end
70
+
71
+ def test_gather_cpu_info_failure
72
+ e = NewRelic::LocalEnvironment.new
73
+ e.gather_cpu_info(File.expand_path(File.join(File.dirname(__FILE__),'..', 'test_helper.rb')))
74
+ s = e.snapshot
75
+ assert_equal 1, s.assoc('Processors').last.to_i
76
+ end
63
77
 
64
78
  def test_default_port
65
79
  e = NewRelic::LocalEnvironment.new
@@ -68,5 +82,4 @@ class NewRelic::LocalEnvironmentTest < Test::Unit::TestCase
68
82
  assert_equal '3121', e.send(:default_port)
69
83
  ARGV.pop
70
84
  end
71
-
72
85
  end
@@ -21,6 +21,11 @@ module DependencyDetection
21
21
  @@items.find {|i| i.name == name }
22
22
  end
23
23
 
24
+ def installed?(name)
25
+ item = dependency_by_name(name)
26
+ item && item.executed
27
+ end
28
+
24
29
  class Dependent
25
30
  attr_reader :executed
26
31
  attr_reader :name
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- hash: 62196449
4
+ hash: 62196455
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 3
8
8
  - 3
9
9
  - 2
10
10
  - beta
11
- - 1
12
- version: 3.3.2.beta1
11
+ - 2
12
+ version: 3.3.2.beta2
13
13
  platform: ruby
14
14
  authors:
15
15
  - Bill Kayser
@@ -20,7 +20,7 @@ autorequire:
20
20
  bindir: bin
21
21
  cert_chain: []
22
22
 
23
- date: 2012-01-20 00:00:00 -08:00
23
+ date: 2012-02-10 00:00:00 -08:00
24
24
  default_executable:
25
25
  dependencies:
26
26
  - !ruby/object:Gem::Dependency
@@ -200,6 +200,7 @@ files:
200
200
  - test/active_record_fixtures.rb
201
201
  - test/config/newrelic.yml
202
202
  - test/config/test_control.rb
203
+ - test/fixtures/proc_cpuinfo.txt
203
204
  - test/new_relic/agent/agent/connect_test.rb
204
205
  - test/new_relic/agent/agent/start_test.rb
205
206
  - test/new_relic/agent/agent/start_worker_thread_test.rb