newrelic_rpm 3.5.2.17 → 3.5.3.24

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 (134) hide show
  1. data/.travis.yml +3 -1
  2. data/CHANGELOG +39 -23
  3. data/GUIDELINES_FOR_CONTRIBUTING.md +23 -2
  4. data/Rakefile +32 -0
  5. data/lib/new_relic/agent.rb +1 -0
  6. data/lib/new_relic/agent/agent.rb +45 -6
  7. data/lib/new_relic/agent/browser_monitoring.rb +36 -20
  8. data/lib/new_relic/agent/busy_calculator.rb +12 -4
  9. data/lib/new_relic/agent/configuration/defaults.rb +6 -1
  10. data/lib/new_relic/agent/configuration/environment_source.rb +14 -0
  11. data/lib/new_relic/agent/instrumentation/sinatra.rb +14 -10
  12. data/lib/new_relic/agent/new_relic_service.rb +192 -34
  13. data/lib/new_relic/agent/pipe_channel_manager.rb +1 -2
  14. data/lib/new_relic/agent/pipe_service.rb +5 -1
  15. data/lib/new_relic/agent/samplers/memory_sampler.rb +1 -1
  16. data/lib/new_relic/agent/sql_sampler.rb +29 -10
  17. data/lib/new_relic/agent/stats_engine/metric_stats.rb +40 -0
  18. data/lib/new_relic/agent/stats_engine/samplers.rb +1 -2
  19. data/lib/new_relic/agent/thread.rb +27 -0
  20. data/lib/new_relic/agent/thread_profiler.rb +295 -0
  21. data/lib/new_relic/agent/worker_loop.rb +29 -15
  22. data/lib/new_relic/control/frameworks/rails.rb +4 -4
  23. data/lib/new_relic/control/frameworks/rails3.rb +1 -1
  24. data/lib/new_relic/helper.rb +3 -0
  25. data/lib/new_relic/metric_data.rb +10 -2
  26. data/lib/new_relic/noticed_error.rb +5 -0
  27. data/lib/new_relic/transaction_sample.rb +23 -13
  28. data/lib/new_relic/transaction_sample/segment.rb +13 -15
  29. data/lib/new_relic/version.rb +1 -1
  30. data/lib/tasks/tests.rake +5 -11
  31. data/test/multiverse/.gitignore +10 -0
  32. data/test/multiverse/README.md +90 -0
  33. data/test/multiverse/Rakefile +17 -0
  34. data/test/multiverse/lib/multiverse/color.rb +13 -0
  35. data/test/multiverse/lib/multiverse/envfile.rb +66 -0
  36. data/test/multiverse/lib/multiverse/environment.rb +16 -0
  37. data/test/multiverse/lib/multiverse/output_collector.rb +29 -0
  38. data/test/multiverse/lib/multiverse/runner.rb +44 -0
  39. data/test/multiverse/lib/multiverse/suite.rb +162 -0
  40. data/test/multiverse/script/run_one +3 -0
  41. data/test/multiverse/script/runner +9 -0
  42. data/test/multiverse/suites/active_record/Envfile +13 -0
  43. data/test/multiverse/suites/active_record/ar_method_aliasing.rb +94 -0
  44. data/test/multiverse/suites/active_record/config/newrelic.yml +22 -0
  45. data/test/multiverse/suites/active_record/encoding_test.rb +26 -0
  46. data/test/multiverse/suites/agent_only/Envfile +3 -0
  47. data/test/multiverse/suites/agent_only/config/newrelic.yml +22 -0
  48. data/test/multiverse/suites/agent_only/http_response_code_test.rb +53 -0
  49. data/test/multiverse/suites/agent_only/marshaling_test.rb +109 -0
  50. data/test/multiverse/suites/agent_only/method_visibility_test.rb +98 -0
  51. data/test/multiverse/suites/agent_only/pipe_manager_test.rb +33 -0
  52. data/test/multiverse/suites/agent_only/service_timeout_test.rb +29 -0
  53. data/test/multiverse/suites/agent_only/test_trace_method_with_punctuation.rb +30 -0
  54. data/test/multiverse/suites/agent_only/test_trace_transaction_with_punctuation.rb +32 -0
  55. data/test/multiverse/suites/agent_only/thread_profiling_test.rb +80 -0
  56. data/test/multiverse/suites/datamapper/Envfile +8 -0
  57. data/test/multiverse/suites/datamapper/config/newrelic.yml +22 -0
  58. data/test/multiverse/suites/datamapper/encoding_test.rb +36 -0
  59. data/test/multiverse/suites/monitor_mode_false/Envfile +2 -0
  60. data/test/multiverse/suites/monitor_mode_false/config/newrelic.yml +25 -0
  61. data/test/multiverse/suites/monitor_mode_false/no_dns_resolv.rb +29 -0
  62. data/test/multiverse/suites/no_load/Envfile +2 -0
  63. data/test/multiverse/suites/no_load/config/newrelic.yml +23 -0
  64. data/test/multiverse/suites/no_load/start_up_test.rb +14 -0
  65. data/test/multiverse/suites/rails_3_error_tracing/Envfile +15 -0
  66. data/test/multiverse/suites/rails_3_error_tracing/config/newrelic.yml +165 -0
  67. data/test/multiverse/suites/rails_3_error_tracing/error_tracing_test.rb +236 -0
  68. data/test/multiverse/suites/rails_3_gc/Envfile +8 -0
  69. data/test/multiverse/suites/rails_3_gc/config/newrelic.yml +167 -0
  70. data/test/multiverse/suites/rails_3_gc/instrumentation_test.rb +92 -0
  71. data/test/multiverse/suites/rails_3_queue_time/Envfile +15 -0
  72. data/test/multiverse/suites/rails_3_queue_time/config/newrelic.yml +165 -0
  73. data/test/multiverse/suites/rails_3_queue_time/queue_time_test.rb +75 -0
  74. data/test/multiverse/suites/rails_3_views/.gitignore +3 -0
  75. data/test/multiverse/suites/rails_3_views/Envfile +16 -0
  76. data/test/multiverse/suites/rails_3_views/app/views/foos/_foo.html.haml +1 -0
  77. data/test/multiverse/suites/rails_3_views/app/views/test/_a_partial.html.erb +1 -0
  78. data/test/multiverse/suites/rails_3_views/app/views/test/_mid_partial.html.erb +1 -0
  79. data/test/multiverse/suites/rails_3_views/app/views/test/_top_partial.html.erb +3 -0
  80. data/test/multiverse/suites/rails_3_views/app/views/test/deep_partial.html.erb +3 -0
  81. data/test/multiverse/suites/rails_3_views/app/views/test/haml_view.html.haml +6 -0
  82. data/test/multiverse/suites/rails_3_views/app/views/test/index.html.erb +4 -0
  83. data/test/multiverse/suites/rails_3_views/config/newrelic.yml +164 -0
  84. data/test/multiverse/suites/rails_3_views/view_instrumentation_test.rb +245 -0
  85. data/test/multiverse/suites/resque/Envfile +21 -0
  86. data/test/multiverse/suites/resque/config/newrelic.yml +22 -0
  87. data/test/multiverse/suites/resque/dump.rdb +0 -0
  88. data/test/multiverse/suites/resque/instrumentation_test.rb +73 -0
  89. data/test/multiverse/suites/rum_auto_instrumentation/Envfile +4 -0
  90. data/test/multiverse/suites/rum_auto_instrumentation/config/newrelic.yml +24 -0
  91. data/test/multiverse/suites/rum_auto_instrumentation/problem_response.html +422 -0
  92. data/test/multiverse/suites/rum_auto_instrumentation/responses/worst_case_small.html +5000 -0
  93. data/test/multiverse/suites/rum_auto_instrumentation/sanity_test.rb +115 -0
  94. data/test/multiverse/suites/sinatra/Envfile +13 -0
  95. data/test/multiverse/suites/sinatra/config/newrelic.yml +24 -0
  96. data/test/multiverse/suites/sinatra/sinatra_metric_explosion_test.rb +76 -0
  97. data/test/multiverse/suites/sinatra/sinatra_routes_test.rb +46 -0
  98. data/test/multiverse/test/multiverse_test.rb +55 -0
  99. data/test/multiverse/test/suite_examples/one/a/Envfile +3 -0
  100. data/test/multiverse/test/suite_examples/one/a/a_test.rb +11 -0
  101. data/test/multiverse/test/suite_examples/one/a/config/newrelic.yml +24 -0
  102. data/test/multiverse/test/suite_examples/one/b/Envfile +3 -0
  103. data/test/multiverse/test/suite_examples/one/b/b_test.rb +11 -0
  104. data/test/multiverse/test/suite_examples/one/b/config/newrelic.yml +24 -0
  105. data/test/multiverse/test/suite_examples/three/a/Envfile +2 -0
  106. data/test/multiverse/test/suite_examples/three/a/fail_test.rb +6 -0
  107. data/test/multiverse/test/suite_examples/three/b/Envfile +2 -0
  108. data/test/multiverse/test/suite_examples/three/b/win_test.rb +6 -0
  109. data/test/multiverse/test/suite_examples/two/a/Envfile +1 -0
  110. data/test/multiverse/test/suite_examples/two/a/fail_test.rb +6 -0
  111. data/test/new_relic/agent/agent_test.rb +54 -2
  112. data/test/new_relic/agent/agent_test_controller.rb +1 -1
  113. data/test/new_relic/agent/agent_test_controller_test.rb +35 -5
  114. data/test/new_relic/agent/browser_monitoring_test.rb +8 -8
  115. data/test/new_relic/agent/configuration/environment_source_test.rb +16 -0
  116. data/test/new_relic/agent/method_tracer_test.rb +6 -6
  117. data/test/new_relic/agent/new_relic_service_test.rb +137 -20
  118. data/test/new_relic/agent/sql_sampler_test.rb +26 -0
  119. data/test/new_relic/agent/stats_engine/metric_stats_test.rb +1 -1
  120. data/test/new_relic/agent/stats_engine_test.rb +1 -0
  121. data/test/new_relic/agent/thread_profiler_test.rb +536 -0
  122. data/test/new_relic/agent/thread_test.rb +76 -0
  123. data/test/new_relic/agent/threaded_test.rb +65 -0
  124. data/test/new_relic/agent/transaction_sampler_test.rb +16 -13
  125. data/test/new_relic/agent/worker_loop_test.rb +20 -0
  126. data/test/new_relic/fake_collector.rb +103 -31
  127. data/test/new_relic/fake_service.rb +7 -1
  128. data/test/new_relic/metric_data_test.rb +45 -16
  129. data/test/new_relic/noticed_error_test.rb +14 -0
  130. data/test/new_relic/transaction_sample/segment_test.rb +23 -4
  131. data/test/new_relic/transaction_sample_test.rb +39 -0
  132. data/ui/views/layouts/newrelic_default.rhtml +1 -0
  133. data/ui/views/newrelic/threads.rhtml +2 -10
  134. metadata +88 -2
@@ -7,12 +7,14 @@ module NewRelic
7
7
  def initialize
8
8
  @agent_data = []
9
9
  @supported_methods = [ :connect, :metric_data, :transaction_sample_data,
10
- :error_data, :sql_trace_data, :shutdown ]
10
+ :error_data, :sql_trace_data, :profile_data,
11
+ :get_agent_commands, :shutdown ]
11
12
  @collector = NewRelic::Control::Server.new(:name => 'fakehost', :port => 0)
12
13
  @id_counter = 0
13
14
  @base_expectations = {
14
15
  'get_redirect_host' => 'localhost',
15
16
  'connect' => { 'agent_run_id' => agent_run_id },
17
+ 'get_agent_commands' => [],
16
18
  'metric_data' => { 'Some/Metric/Spec' => 1 },
17
19
  'sql_trace_data' => nil,
18
20
  'transaction_sample_data' => nil,
@@ -31,6 +33,10 @@ module NewRelic
31
33
  @id_counter = 0
32
34
  @agent_data = []
33
35
  end
36
+
37
+ def stub_service(method, value)
38
+ @mock[method.to_s] = value
39
+ end
34
40
 
35
41
  def method_missing(method, *args)
36
42
  if @supported_methods.include?(method)
@@ -14,50 +14,49 @@ class NewRelic::MetricDataTest < Test::Unit::TestCase
14
14
  def test_eql_basic
15
15
  spec = mock('metric_spec')
16
16
  stats = mock('stats')
17
- metric_id = mock('metric_id')
17
+ metric_id = mock('metric_id')
18
18
  md1 = NewRelic::MetricData.new(spec, stats, metric_id)
19
19
  md2 = NewRelic::MetricData.new(spec, stats, metric_id)
20
20
  assert(md1.eql?(md2), "The example metric data objects should be eql?: #{md1.inspect} #{md2.inspect}")
21
- assert(md2.eql?(md1), "The example metric data objects should be eql?: #{md1.inspect} #{md2.inspect}")
21
+ assert(md2.eql?(md1), "The example metric data objects should be eql?: #{md1.inspect} #{md2.inspect}")
22
22
  end
23
23
 
24
24
  def test_eql_unequal_specs
25
-
26
25
  spec = mock('metric_spec')
27
26
  other_spec = mock('other_spec')
28
27
  stats = mock('stats')
29
- metric_id = mock('metric_id')
28
+ metric_id = mock('metric_id')
30
29
  md1 = NewRelic::MetricData.new(spec, stats, metric_id)
31
30
  md2 = NewRelic::MetricData.new(other_spec, stats, metric_id)
32
31
  assert(!md1.eql?(md2), "The example metric data objects should not be eql?: #{md1.inspect} #{md2.inspect}")
33
- assert(!md2.eql?(md1), "The example metric data objects should not be eql?: #{md1.inspect} #{md2.inspect}")
32
+ assert(!md2.eql?(md1), "The example metric data objects should not be eql?: #{md1.inspect} #{md2.inspect}")
34
33
  end
35
34
  def test_eql_unequal_stats
36
35
  spec = mock('metric_spec')
37
36
  stats = mock('stats')
38
37
  other_stats = mock('other_stats')
39
- metric_id = mock('metric_id')
38
+ metric_id = mock('metric_id')
40
39
  md1 = NewRelic::MetricData.new(spec, stats, metric_id)
41
40
  md2 = NewRelic::MetricData.new(spec, other_stats, metric_id)
42
41
  assert(!md1.eql?(md2), "The example metric data objects should not be eql?: #{md1.inspect} #{md2.inspect}")
43
- assert(!md2.eql?(md1), "The example metric data objects should not be eql?: #{md1.inspect} #{md2.inspect}")
42
+ assert(!md2.eql?(md1), "The example metric data objects should not be eql?: #{md1.inspect} #{md2.inspect}")
44
43
  end
45
44
 
46
45
  def test_eql_unequal_metric_ids_dont_matter
47
46
  spec = mock('metric_spec')
48
47
  stats = mock('stats')
49
48
  metric_id = mock('metric_id')
50
- other_metric_id = mock('other_metric_id')
49
+ other_metric_id = mock('other_metric_id')
51
50
  md1 = NewRelic::MetricData.new(spec, stats, metric_id)
52
51
  md2 = NewRelic::MetricData.new(spec, stats, other_metric_id)
53
52
  assert(md1.eql?(md2), "The example metric data objects should be eql? with different metric_ids: #{md1.inspect} #{md2.inspect}")
54
- assert(md2.eql?(md1), "The example metric data objects should be eql? with different metric_ids: #{md1.inspect} #{md2.inspect}")
53
+ assert(md2.eql?(md1), "The example metric data objects should be eql? with different metric_ids: #{md1.inspect} #{md2.inspect}")
55
54
  end
56
55
 
57
56
  def test_original_spec_basic
58
57
  spec = mock('metric_spec')
59
58
  stats = mock('stats')
60
- metric_id = mock('metric_id')
59
+ metric_id = mock('metric_id')
61
60
  md1 = NewRelic::MetricData.new(spec, stats, metric_id)
62
61
  original_spec = md1.instance_variable_get('@original_spec')
63
62
  assert_equal(nil, original_spec, "should start with a nil original spec, but was #{original_spec.inspect}")
@@ -66,26 +65,26 @@ class NewRelic::MetricDataTest < Test::Unit::TestCase
66
65
 
67
66
  def test_metric_spec_equal_should_not_set_original_spec_with_no_metric_spec
68
67
  stats = mock('stats')
69
- metric_id = mock('metric_id')
68
+ metric_id = mock('metric_id')
70
69
  md1 = NewRelic::MetricData.new(nil, stats, metric_id)
71
70
  original_spec = md1.instance_variable_get('@original_spec')
72
71
  assert_equal(nil, original_spec, "should start with a nil original spec, but was #{original_spec.inspect}")
73
-
72
+
74
73
  new_spec = mock('new metric_spec')
75
74
  assert_equal(new_spec, md1.metric_spec=(new_spec), "should return the new spec")
76
75
 
77
76
  new_original_spec = md1.instance_variable_get('@original_spec')
78
77
  assert_equal(nil, new_original_spec, "should not set @original_spec but was #{new_original_spec.inspect}")
79
78
  end
80
-
79
+
81
80
  def test_metric_spec_equal_should_set_original_spec_with_existing_metric_spec
82
81
  spec = mock('metric_spec')
83
82
  stats = mock('stats')
84
- metric_id = mock('metric_id')
83
+ metric_id = mock('metric_id')
85
84
  md1 = NewRelic::MetricData.new(spec, stats, metric_id)
86
85
  original_spec = md1.instance_variable_get('@original_spec')
87
86
  assert_equal(nil, original_spec, "should start with a nil original spec, but was #{original_spec.inspect}")
88
-
87
+
89
88
  new_spec = mock('new metric_spec')
90
89
  assert_equal(new_spec, md1.metric_spec=(new_spec), "should return the new spec")
91
90
 
@@ -96,7 +95,7 @@ class NewRelic::MetricDataTest < Test::Unit::TestCase
96
95
  def test_hash
97
96
  spec = mock('metric_spec')
98
97
  stats = mock('stats')
99
- metric_id = mock('metric_id')
98
+ metric_id = mock('metric_id')
100
99
  md1 = NewRelic::MetricData.new(spec, stats, metric_id)
101
100
  assert((spec.hash ^ stats.hash) == md1.hash, "expected #{spec.hash ^ stats.hash} to equal #{md1.hash}")
102
101
  end
@@ -122,4 +121,34 @@ class NewRelic::MetricDataTest < Test::Unit::TestCase
122
121
  md = NewRelic::MetricData.new(nil, NewRelic::MethodTraceStats.new, 12345)
123
122
  assert_equal('12345: [01/01/70 12:00AM UTC, 0.000s; 0 calls 0s]', md.to_s, "should include the metric id and not have a metric spec")
124
123
  end
124
+
125
+ def test_to_collector_array_with_spec
126
+ stats = NewRelic::MethodTraceStats.new
127
+ stats.record_data_point(1.0)
128
+ stats.record_data_point(2.0, 1.0)
129
+ md = NewRelic::MetricData.new(NewRelic::MetricSpec.new('Custom/test/method', 'scope'),
130
+ stats, nil)
131
+ expected = [ {'name' => 'Custom/test/method', 'scope' => 'scope'},
132
+ [2, 3.0, 2.0, 1.0, 2.0, 5.0] ]
133
+ assert_equal expected, md.to_collector_array
134
+ end
135
+
136
+ def test_to_collector_array_with_spec_and_id
137
+ stats = NewRelic::MethodTraceStats.new
138
+ stats.record_data_point(1.0)
139
+ stats.record_data_point(2.0, 1.0)
140
+ md = NewRelic::MetricData.new(NewRelic::MetricSpec.new('Custom/test/method', 'scope'),
141
+ stats, 1234)
142
+ expected = [ 1234, [2, 3.0, 2.0, 1.0, 2.0, 5.0] ]
143
+ assert_equal expected, md.to_collector_array
144
+ end
145
+
146
+ def test_to_collector_array_with_id
147
+ stats = NewRelic::MethodTraceStats.new
148
+ stats.record_data_point(1.0)
149
+ stats.record_data_point(2.0, 1.0)
150
+ md = NewRelic::MetricData.new(nil, stats, 1234)
151
+ expected = [ 1234, [2, 3.0, 2.0, 1.0, 2.0, 5.0] ]
152
+ assert_equal expected, md.to_collector_array
153
+ end
125
154
  end
@@ -0,0 +1,14 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__),'..','test_helper'))
2
+
3
+ class NewRelic::Agent::NoticedErrorTest < Test::Unit::TestCase
4
+ def test_to_collector_array
5
+ time = Time.now
6
+ error = NewRelic::NoticedError.new('path', {'key' => 'val'},
7
+ Exception.new('test exception'), time)
8
+ expected = [
9
+ (time.to_f * 1000).round, 'path', 'test exception', 'Exception',
10
+ {'key' => 'val'}
11
+ ]
12
+ assert_equal expected, error.to_collector_array
13
+ end
14
+ end
@@ -39,10 +39,29 @@ class NewRelic::TransactionSample::SegmentTest < Test::Unit::TestCase
39
39
  s.to_s
40
40
  end
41
41
 
42
- def test_to_json
43
- t = Time.now
44
- s = NewRelic::TransactionSample::Segment.new(t, 'Custom/test/metric', nil)
45
- assert_equal({ :entry_timestamp => t, :exit_timestamp => nil, :metric_name => 'Custom/test/metric', :segment_id => s.object_id }.to_json, s.to_json)
42
+ def test_to_array
43
+ parent = NewRelic::TransactionSample::Segment.new(1, 'Custom/test/parent', 1)
44
+ parent.params[:test] = 'value'
45
+ child = NewRelic::TransactionSample::Segment.new(2, 'Custom/test/child', 2)
46
+ child.end_trace(3)
47
+ parent.add_called_segment(child)
48
+ parent.end_trace(4)
49
+ expected_array = [1000, 4000, 'Custom/test/parent', {:test => 'value'},
50
+ [[2000, 3000, 'Custom/test/child', {}, []]]]
51
+ assert_equal(expected_array, parent.to_array)
52
+ end
53
+
54
+ if RUBY_VERSION >= '1.9.2'
55
+ def test_to_json
56
+ parent = NewRelic::TransactionSample::Segment.new(1, 'Custom/test/parent', 1)
57
+ parent.params[:test] = 'value'
58
+ child = NewRelic::TransactionSample::Segment.new(2, 'Custom/test/child', 2)
59
+ child.end_trace(3)
60
+ parent.add_called_segment(child)
61
+ parent.end_trace(4)
62
+ expected_string = "[1000,4000,\"Custom/test/parent\",{\"test\":\"value\"},[[2000,3000,\"Custom/test/child\",{},[]]]]"
63
+ assert_equal(expected_string, parent.to_json)
64
+ end
46
65
  end
47
66
 
48
67
  def test_path_string
@@ -180,4 +180,43 @@ class NewRelic::TransactionSampleTest < Test::Unit::TestCase
180
180
  end
181
181
  assert_equal 6, transaction.count_segments
182
182
  end
183
+
184
+ def test_to_array
185
+ expected_array = [@t.start_time.to_f,
186
+ @t.params[:request_params],
187
+ @t.params[:custom_params],
188
+ @t.root_segment.to_array]
189
+ assert_equal expected_array, @t.to_array
190
+ end
191
+
192
+ if RUBY_VERSION >= '1.9.2'
193
+ def test_to_json
194
+ expected_string = JSON.dump([@t.start_time.to_f,
195
+ @t.params[:request_params],
196
+ @t.params[:custom_params],
197
+ @t.root_segment.to_array])
198
+ assert_equal expected_string, @t.to_json
199
+ end
200
+ end
201
+
202
+ def test_to_collector_array
203
+ if NewRelic::Agent::NewRelicService::JsonMarshaller.is_supported?
204
+ marshaller = NewRelic::Agent::NewRelicService::JsonMarshaller.new
205
+ trace_tree = compress(@t.to_json)
206
+ else
207
+ marshaller = NewRelic::Agent::NewRelicService::PrubyMarshaller.new
208
+ trace_tree = @t.to_array
209
+ end
210
+ expected_array = [(@t.start_time.to_f * 1000).round,
211
+ (@t.duration * 1000).round,
212
+ @t.params[:path], @t.params[:uri],
213
+ trace_tree,
214
+ @t.guid, nil, !!@t.force_persist]
215
+
216
+ assert_equal expected_array, @t.to_collector_array(marshaller)
217
+ end
218
+
219
+ def compress(string)
220
+ Base64.encode64(Zlib::Deflate.deflate(string, Zlib::DEFAULT_COMPRESSION))
221
+ end
183
222
  end
@@ -2,6 +2,7 @@
2
2
  xml:lang="en" lang="en">
3
3
  <head>
4
4
  <script type="text/javascript" src="/newrelic/file/javascript/jquery-1.4.2.js"></script>
5
+ <meta charset="utf-8" />
5
6
  <title>New Relic Developer Mode</title>
6
7
  <link href="/newrelic/file/stylesheets/style.css"
7
8
  media="screen" rel="stylesheet" type="text/css" />
@@ -8,22 +8,18 @@
8
8
  <th class="left">Status</th>
9
9
  <th class="left">Group</th>
10
10
  <th class="left">Priority</th>
11
- <th class="left">Locals</th>
12
11
  </thead>
13
12
  <%
14
13
  main = Thread.main
15
14
  threads = Thread.list - [ main ]
16
15
  nr_threads = []
17
- threads.delete_if { | thread | nr_threads << thread if thread.key? 'newrelic_label' }
16
+ threads.delete_if { | thread | nr_threads << thread if thread.key?(:newrelic_label) }
18
17
  ([ main ] + threads).each_with_index do | thread, i | %>
19
18
  <tr class="odd_row">
20
19
  <td valign="top"><%= h(thread == main ? 'main' : thread.to_s) %></td>
21
20
  <td valign="top"><%= h(thread.status || 'terminated with exception') %></td>
22
21
  <td valign="top"><%= h(thread.group || 'none') %></td>
23
22
  <td valign="top"><%= h thread.priority %></td>
24
- <td class="locals">
25
- <%= thread.keys.map{|k| h k}.join("</br>") %>
26
- </td>
27
23
  </tr>
28
24
  <% end %>
29
25
  <% if nr_threads.size > 0 %>
@@ -34,18 +30,14 @@
34
30
  <th class="left">Status</th>
35
31
  <th class="left">Group</th>
36
32
  <th class="left">Priority</th>
37
- <th class="left">Locals</th>
38
33
  </thead>
39
34
 
40
35
  <% nr_threads.each_with_index do | thread, i | %>
41
36
  <tr class="odd_row">
42
- <td valign="top"><%= h thread['newrelic_label'] %></td>
37
+ <td valign="top"><%= h thread[:newrelic_label] %></td>
43
38
  <td valign="top"><%= h(thread.status || 'terminated with exception') %></td>
44
39
  <td valign="top"><%= h(thread.group || 'none') %></td>
45
40
  <td valign="top"><%= h thread.priority %></td>
46
- <td class="locals">
47
- <%= (thread.keys - ['newrelic_label']).map{|k| h k}.join("</br>") %>
48
- </td>
49
41
  </tr>
50
42
  <% end %>
51
43
  <% end %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.2.17
4
+ version: 3.5.3.24
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-11-14 00:00:00.000000000 Z
14
+ date: 2012-12-04 00:00:00.000000000 Z
15
15
  dependencies: []
16
16
  description: ! 'New Relic is a performance management system, developed by New Relic,
17
17
 
@@ -117,6 +117,8 @@ files:
117
117
  - lib/new_relic/agent/stats_engine/metric_stats.rb
118
118
  - lib/new_relic/agent/stats_engine/samplers.rb
119
119
  - lib/new_relic/agent/stats_engine/transactions.rb
120
+ - lib/new_relic/agent/thread.rb
121
+ - lib/new_relic/agent/thread_profiler.rb
120
122
  - lib/new_relic/agent/transaction_info.rb
121
123
  - lib/new_relic/agent/transaction_sample_builder.rb
122
124
  - lib/new_relic/agent/transaction_sampler.rb
@@ -176,6 +178,86 @@ files:
176
178
  - test/config/test_control.rb
177
179
  - test/fixtures/proc_cpuinfo.txt
178
180
  - test/intentional_fail.rb
181
+ - test/multiverse/.gitignore
182
+ - test/multiverse/README.md
183
+ - test/multiverse/Rakefile
184
+ - test/multiverse/lib/multiverse/color.rb
185
+ - test/multiverse/lib/multiverse/envfile.rb
186
+ - test/multiverse/lib/multiverse/environment.rb
187
+ - test/multiverse/lib/multiverse/output_collector.rb
188
+ - test/multiverse/lib/multiverse/runner.rb
189
+ - test/multiverse/lib/multiverse/suite.rb
190
+ - test/multiverse/script/run_one
191
+ - test/multiverse/script/runner
192
+ - test/multiverse/suites/active_record/Envfile
193
+ - test/multiverse/suites/active_record/ar_method_aliasing.rb
194
+ - test/multiverse/suites/active_record/config/newrelic.yml
195
+ - test/multiverse/suites/active_record/encoding_test.rb
196
+ - test/multiverse/suites/agent_only/Envfile
197
+ - test/multiverse/suites/agent_only/config/newrelic.yml
198
+ - test/multiverse/suites/agent_only/http_response_code_test.rb
199
+ - test/multiverse/suites/agent_only/marshaling_test.rb
200
+ - test/multiverse/suites/agent_only/method_visibility_test.rb
201
+ - test/multiverse/suites/agent_only/pipe_manager_test.rb
202
+ - test/multiverse/suites/agent_only/service_timeout_test.rb
203
+ - test/multiverse/suites/agent_only/test_trace_method_with_punctuation.rb
204
+ - test/multiverse/suites/agent_only/test_trace_transaction_with_punctuation.rb
205
+ - test/multiverse/suites/agent_only/thread_profiling_test.rb
206
+ - test/multiverse/suites/datamapper/Envfile
207
+ - test/multiverse/suites/datamapper/config/newrelic.yml
208
+ - test/multiverse/suites/datamapper/encoding_test.rb
209
+ - test/multiverse/suites/monitor_mode_false/Envfile
210
+ - test/multiverse/suites/monitor_mode_false/config/newrelic.yml
211
+ - test/multiverse/suites/monitor_mode_false/no_dns_resolv.rb
212
+ - test/multiverse/suites/no_load/Envfile
213
+ - test/multiverse/suites/no_load/config/newrelic.yml
214
+ - test/multiverse/suites/no_load/start_up_test.rb
215
+ - test/multiverse/suites/rails_3_error_tracing/Envfile
216
+ - test/multiverse/suites/rails_3_error_tracing/config/newrelic.yml
217
+ - test/multiverse/suites/rails_3_error_tracing/error_tracing_test.rb
218
+ - test/multiverse/suites/rails_3_gc/Envfile
219
+ - test/multiverse/suites/rails_3_gc/config/newrelic.yml
220
+ - test/multiverse/suites/rails_3_gc/instrumentation_test.rb
221
+ - test/multiverse/suites/rails_3_queue_time/Envfile
222
+ - test/multiverse/suites/rails_3_queue_time/config/newrelic.yml
223
+ - test/multiverse/suites/rails_3_queue_time/queue_time_test.rb
224
+ - test/multiverse/suites/rails_3_views/.gitignore
225
+ - test/multiverse/suites/rails_3_views/Envfile
226
+ - test/multiverse/suites/rails_3_views/app/views/foos/_foo.html.haml
227
+ - test/multiverse/suites/rails_3_views/app/views/test/_a_partial.html.erb
228
+ - test/multiverse/suites/rails_3_views/app/views/test/_mid_partial.html.erb
229
+ - test/multiverse/suites/rails_3_views/app/views/test/_top_partial.html.erb
230
+ - test/multiverse/suites/rails_3_views/app/views/test/deep_partial.html.erb
231
+ - test/multiverse/suites/rails_3_views/app/views/test/haml_view.html.haml
232
+ - test/multiverse/suites/rails_3_views/app/views/test/index.html.erb
233
+ - test/multiverse/suites/rails_3_views/config/newrelic.yml
234
+ - test/multiverse/suites/rails_3_views/view_instrumentation_test.rb
235
+ - test/multiverse/suites/resque/Envfile
236
+ - test/multiverse/suites/resque/config/newrelic.yml
237
+ - test/multiverse/suites/resque/dump.rdb
238
+ - test/multiverse/suites/resque/instrumentation_test.rb
239
+ - test/multiverse/suites/rum_auto_instrumentation/Envfile
240
+ - test/multiverse/suites/rum_auto_instrumentation/config/newrelic.yml
241
+ - test/multiverse/suites/rum_auto_instrumentation/problem_response.html
242
+ - test/multiverse/suites/rum_auto_instrumentation/responses/worst_case_small.html
243
+ - test/multiverse/suites/rum_auto_instrumentation/sanity_test.rb
244
+ - test/multiverse/suites/sinatra/Envfile
245
+ - test/multiverse/suites/sinatra/config/newrelic.yml
246
+ - test/multiverse/suites/sinatra/sinatra_metric_explosion_test.rb
247
+ - test/multiverse/suites/sinatra/sinatra_routes_test.rb
248
+ - test/multiverse/test/multiverse_test.rb
249
+ - test/multiverse/test/suite_examples/one/a/Envfile
250
+ - test/multiverse/test/suite_examples/one/a/a_test.rb
251
+ - test/multiverse/test/suite_examples/one/a/config/newrelic.yml
252
+ - test/multiverse/test/suite_examples/one/b/Envfile
253
+ - test/multiverse/test/suite_examples/one/b/b_test.rb
254
+ - test/multiverse/test/suite_examples/one/b/config/newrelic.yml
255
+ - test/multiverse/test/suite_examples/three/a/Envfile
256
+ - test/multiverse/test/suite_examples/three/a/fail_test.rb
257
+ - test/multiverse/test/suite_examples/three/b/Envfile
258
+ - test/multiverse/test/suite_examples/three/b/win_test.rb
259
+ - test/multiverse/test/suite_examples/two/a/Envfile
260
+ - test/multiverse/test/suite_examples/two/a/fail_test.rb
179
261
  - test/new_relic/agent/agent/connect_test.rb
180
262
  - test/new_relic/agent/agent/start_test.rb
181
263
  - test/new_relic/agent/agent/start_worker_thread_test.rb
@@ -218,6 +300,9 @@ files:
218
300
  - test/new_relic/agent/stats_engine/metric_stats_test.rb
219
301
  - test/new_relic/agent/stats_engine/samplers_test.rb
220
302
  - test/new_relic/agent/stats_engine_test.rb
303
+ - test/new_relic/agent/thread_profiler_test.rb
304
+ - test/new_relic/agent/thread_test.rb
305
+ - test/new_relic/agent/threaded_test.rb
221
306
  - test/new_relic/agent/transaction_info_test.rb
222
307
  - test/new_relic/agent/transaction_sample_builder_test.rb
223
308
  - test/new_relic/agent/transaction_sampler_test.rb
@@ -237,6 +322,7 @@ files:
237
322
  - test/new_relic/metric_data_test.rb
238
323
  - test/new_relic/metric_parser/metric_parser_test.rb
239
324
  - test/new_relic/metric_spec_test.rb
325
+ - test/new_relic/noticed_error_test.rb
240
326
  - test/new_relic/rack/all_test.rb
241
327
  - test/new_relic/rack/browser_monitoring_test.rb
242
328
  - test/new_relic/rack/developer_mode_helper_test.rb