newrelic_rpm 2.10.8 → 2.11.0.beta

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 (212) hide show
  1. data/CHANGELOG +15 -3
  2. data/lib/new_relic/agent.rb +17 -6
  3. data/lib/new_relic/agent/agent.rb +98 -77
  4. data/lib/new_relic/agent/busy_calculator.rb +1 -1
  5. data/lib/new_relic/agent/error_collector.rb +6 -3
  6. data/lib/new_relic/agent/instrumentation/active_record_instrumentation.rb +1 -0
  7. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +0 -2
  8. data/lib/new_relic/agent/instrumentation/memcache.rb +0 -1
  9. data/lib/new_relic/agent/instrumentation/metric_frame.rb +8 -2
  10. data/lib/new_relic/agent/instrumentation/passenger_instrumentation.rb +3 -3
  11. data/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb +10 -0
  12. data/lib/new_relic/agent/method_tracer.rb +1 -1
  13. data/lib/new_relic/agent/shim_agent.rb +1 -1
  14. data/lib/new_relic/agent/stats_engine.rb +1 -1
  15. data/lib/new_relic/agent/stats_engine/samplers.rb +2 -2
  16. data/lib/new_relic/control.rb +6 -3
  17. data/lib/new_relic/rack/metric_app.rb +4 -4
  18. data/lib/new_relic/version.rb +3 -3
  19. data/newrelic.yml +3 -3
  20. data/newrelic_rpm.gemspec +4 -192
  21. data/test/new_relic/agent/rpm_agent_test.rb +15 -2
  22. data/test/new_relic/agent/task_instrumentation_test.rb +3 -2
  23. metadata +12 -197
  24. data/rdoc/classes/NewRelic.html +0 -293
  25. data/rdoc/classes/NewRelic/Agent.html +0 -810
  26. data/rdoc/classes/NewRelic/Agent/Agent.html +0 -742
  27. data/rdoc/classes/NewRelic/Agent/BackgroundLoadingError.html +0 -111
  28. data/rdoc/classes/NewRelic/Agent/BusyCalculator.html +0 -309
  29. data/rdoc/classes/NewRelic/Agent/CollectionHelper.html +0 -196
  30. data/rdoc/classes/NewRelic/Agent/ErrorCollector.html +0 -378
  31. data/rdoc/classes/NewRelic/Agent/ForceDisconnectException.html +0 -118
  32. data/rdoc/classes/NewRelic/Agent/ForceRestartException.html +0 -117
  33. data/rdoc/classes/NewRelic/Agent/IgnoreSilentlyException.html +0 -118
  34. data/rdoc/classes/NewRelic/Agent/Instrumentation.html +0 -174
  35. data/rdoc/classes/NewRelic/Agent/Instrumentation/ActiveRecordInstrumentation.html +0 -221
  36. data/rdoc/classes/NewRelic/Agent/Instrumentation/ControllerInstrumentation.html +0 -349
  37. data/rdoc/classes/NewRelic/Agent/Instrumentation/ControllerInstrumentation/ClassMethods.html +0 -277
  38. data/rdoc/classes/NewRelic/Agent/Instrumentation/DelayedJobInstrumentation.html +0 -112
  39. data/rdoc/classes/NewRelic/Agent/Instrumentation/MetricFrame.html +0 -1007
  40. data/rdoc/classes/NewRelic/Agent/Instrumentation/Rack.html +0 -321
  41. data/rdoc/classes/NewRelic/Agent/Instrumentation/Sinatra.html +0 -176
  42. data/rdoc/classes/NewRelic/Agent/LicenseException.html +0 -117
  43. data/rdoc/classes/NewRelic/Agent/MethodTracer.html +0 -150
  44. data/rdoc/classes/NewRelic/Agent/MethodTracer/ClassMethods.html +0 -295
  45. data/rdoc/classes/NewRelic/Agent/MethodTracer/InstanceMethods.html +0 -284
  46. data/rdoc/classes/NewRelic/Agent/PostTooBigException.html +0 -120
  47. data/rdoc/classes/NewRelic/Agent/Sampler.html +0 -314
  48. data/rdoc/classes/NewRelic/Agent/Sampler/Unsupported.html +0 -117
  49. data/rdoc/classes/NewRelic/Agent/Samplers.html +0 -126
  50. data/rdoc/classes/NewRelic/Agent/Samplers/CpuSampler.html +0 -327
  51. data/rdoc/classes/NewRelic/Agent/Samplers/DelayedJobLockSampler.html +0 -296
  52. data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler.html +0 -321
  53. data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler/Base.html +0 -186
  54. data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler/JavaHeapSampler.html +0 -173
  55. data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler/ProcStatus.html +0 -216
  56. data/rdoc/classes/NewRelic/Agent/Samplers/MemorySampler/ShellPS.html +0 -207
  57. data/rdoc/classes/NewRelic/Agent/Samplers/ObjectSampler.html +0 -222
  58. data/rdoc/classes/NewRelic/Agent/ServerError.html +0 -117
  59. data/rdoc/classes/NewRelic/Agent/ShimAgent.html +0 -297
  60. data/rdoc/classes/NewRelic/Agent/StatsEngine.html +0 -204
  61. data/rdoc/classes/NewRelic/Agent/StatsEngine/MetricStats.html +0 -441
  62. data/rdoc/classes/NewRelic/Agent/StatsEngine/Samplers.html +0 -237
  63. data/rdoc/classes/NewRelic/Agent/StatsEngine/ScopeStackElement.html +0 -178
  64. data/rdoc/classes/NewRelic/Agent/StatsEngine/Transactions.html +0 -385
  65. data/rdoc/classes/NewRelic/Agent/TransactionSampleBuilder.html +0 -505
  66. data/rdoc/classes/NewRelic/Agent/TransactionSampler.html +0 -690
  67. data/rdoc/classes/NewRelic/Agent/WorkerLoop.html +0 -305
  68. data/rdoc/classes/NewRelic/Agent/WorkerLoop/LoopTask.html +0 -224
  69. data/rdoc/classes/NewRelic/ApdexStats.html +0 -196
  70. data/rdoc/classes/NewRelic/BasicStats.html +0 -113
  71. data/rdoc/classes/NewRelic/ChainedCall.html +0 -180
  72. data/rdoc/classes/NewRelic/Commands.html +0 -112
  73. data/rdoc/classes/NewRelic/Commands/CommandFailure.html +0 -167
  74. data/rdoc/classes/NewRelic/Commands/Deployments.html +0 -285
  75. data/rdoc/classes/NewRelic/Control.html +0 -1760
  76. data/rdoc/classes/NewRelic/Control/External.html +0 -148
  77. data/rdoc/classes/NewRelic/Control/Merb.html +0 -227
  78. data/rdoc/classes/NewRelic/Control/Rails.html +0 -542
  79. data/rdoc/classes/NewRelic/Control/Ruby.html +0 -266
  80. data/rdoc/classes/NewRelic/Control/Sinatra.html +0 -178
  81. data/rdoc/classes/NewRelic/DelayedJobInjection.html +0 -118
  82. data/rdoc/classes/NewRelic/Histogram.html +0 -226
  83. data/rdoc/classes/NewRelic/Histogram/Bucket.html +0 -319
  84. data/rdoc/classes/NewRelic/Histogram/Shim.html +0 -144
  85. data/rdoc/classes/NewRelic/LocalEnvironment.html +0 -572
  86. data/rdoc/classes/NewRelic/MerbBootLoader.html +0 -146
  87. data/rdoc/classes/NewRelic/MethodTraceStats.html +0 -250
  88. data/rdoc/classes/NewRelic/MetricData.html +0 -347
  89. data/rdoc/classes/NewRelic/MetricParser.html +0 -747
  90. data/rdoc/classes/NewRelic/MetricParser/ActionMailer.html +0 -170
  91. data/rdoc/classes/NewRelic/MetricParser/ActiveMerchant.html +0 -267
  92. data/rdoc/classes/NewRelic/MetricParser/ActiveRecord.html +0 -250
  93. data/rdoc/classes/NewRelic/MetricParser/Controller.html +0 -363
  94. data/rdoc/classes/NewRelic/MetricParser/ControllerCPU.html +0 -319
  95. data/rdoc/classes/NewRelic/MetricParser/Errors.html +0 -170
  96. data/rdoc/classes/NewRelic/MetricParser/External.html +0 -339
  97. data/rdoc/classes/NewRelic/MetricParser/MemCache.html +0 -340
  98. data/rdoc/classes/NewRelic/MetricParser/OtherTransaction.html +0 -205
  99. data/rdoc/classes/NewRelic/MetricParser/View.html +0 -381
  100. data/rdoc/classes/NewRelic/MetricParser/WebFrontend.html +0 -182
  101. data/rdoc/classes/NewRelic/MetricParser/WebService.html +0 -172
  102. data/rdoc/classes/NewRelic/MetricSpec.html +0 -406
  103. data/rdoc/classes/NewRelic/Metrics.html +0 -138
  104. data/rdoc/classes/NewRelic/NoticedError.html +0 -200
  105. data/rdoc/classes/NewRelic/Rack.html +0 -112
  106. data/rdoc/classes/NewRelic/Rack/MetricApp.html +0 -193
  107. data/rdoc/classes/NewRelic/Rack/Status.html +0 -165
  108. data/rdoc/classes/NewRelic/ScopedMethodTraceStats.html +0 -225
  109. data/rdoc/classes/NewRelic/Stats.html +0 -917
  110. data/rdoc/classes/NewRelic/StatsBase.html +0 -346
  111. data/rdoc/classes/NewRelic/TransactionAnalysis.html +0 -269
  112. data/rdoc/classes/NewRelic/TransactionAnalysis/SegmentSummary.html +0 -338
  113. data/rdoc/classes/NewRelic/TransactionSample.html +0 -766
  114. data/rdoc/classes/NewRelic/TransactionSample/CompositeSegment.html +0 -195
  115. data/rdoc/classes/NewRelic/TransactionSample/FakeSegment.html +0 -113
  116. data/rdoc/classes/NewRelic/TransactionSample/IDGenerator.html +0 -178
  117. data/rdoc/classes/NewRelic/TransactionSample/Segment.html +0 -920
  118. data/rdoc/classes/NewRelic/TransactionSample/SummarySegment.html +0 -180
  119. data/rdoc/classes/NewRelic/VersionNumber.html +0 -338
  120. data/rdoc/classes/NewRelicApi.html +0 -270
  121. data/rdoc/classes/NewRelicApi/Account.html +0 -178
  122. data/rdoc/classes/NewRelicApi/Account/AccountUsage.html +0 -111
  123. data/rdoc/classes/NewRelicApi/Account/AccountView.html +0 -146
  124. data/rdoc/classes/NewRelicApi/Application.html +0 -139
  125. data/rdoc/classes/NewRelicApi/Application/Agent.html +0 -119
  126. data/rdoc/classes/NewRelicApi/Deployment.html +0 -123
  127. data/rdoc/classes/NewRelicApi/Subscription.html +0 -111
  128. data/rdoc/classes/NewRelicApi/ThresholdValue.html +0 -174
  129. data/rdoc/classes/NewRelicApi/User.html +0 -111
  130. data/rdoc/created.rid +0 -1
  131. data/rdoc/files/CHANGELOG.html +0 -649
  132. data/rdoc/files/LICENSE.html +0 -143
  133. data/rdoc/files/lib/new_relic/agent/agent_rb.html +0 -113
  134. data/rdoc/files/lib/new_relic/agent/busy_calculator_rb.html +0 -115
  135. data/rdoc/files/lib/new_relic/agent/chained_call_rb.html +0 -107
  136. data/rdoc/files/lib/new_relic/agent/collection_helper_rb.html +0 -101
  137. data/rdoc/files/lib/new_relic/agent/error_collector_rb.html +0 -101
  138. data/rdoc/files/lib/new_relic/agent/instrumentation/active_merchant_rb.html +0 -107
  139. data/rdoc/files/lib/new_relic/agent/instrumentation/active_record_instrumentation_rb.html +0 -108
  140. data/rdoc/files/lib/new_relic/agent/instrumentation/authlogic_rb.html +0 -101
  141. data/rdoc/files/lib/new_relic/agent/instrumentation/controller_instrumentation_rb.html +0 -108
  142. data/rdoc/files/lib/new_relic/agent/instrumentation/data_mapper_rb.html +0 -191
  143. data/rdoc/files/lib/new_relic/agent/instrumentation/delayed_job_instrumentation_rb.html +0 -109
  144. data/rdoc/files/lib/new_relic/agent/instrumentation/memcache_rb.html +0 -152
  145. data/rdoc/files/lib/new_relic/agent/instrumentation/merb/controller_rb.html +0 -155
  146. data/rdoc/files/lib/new_relic/agent/instrumentation/merb/errors_rb.html +0 -107
  147. data/rdoc/files/lib/new_relic/agent/instrumentation/metric_frame_rb.html +0 -113
  148. data/rdoc/files/lib/new_relic/agent/instrumentation/net_rb.html +0 -172
  149. data/rdoc/files/lib/new_relic/agent/instrumentation/passenger_instrumentation_rb.html +0 -101
  150. data/rdoc/files/lib/new_relic/agent/instrumentation/rack_rb.html +0 -108
  151. data/rdoc/files/lib/new_relic/agent/instrumentation/rails/action_controller_rb.html +0 -152
  152. data/rdoc/files/lib/new_relic/agent/instrumentation/rails/action_web_service_rb.html +0 -108
  153. data/rdoc/files/lib/new_relic/agent/instrumentation/rails/errors_rb.html +0 -167
  154. data/rdoc/files/lib/new_relic/agent/instrumentation/sinatra_rb.html +0 -108
  155. data/rdoc/files/lib/new_relic/agent/method_tracer_rb.html +0 -108
  156. data/rdoc/files/lib/new_relic/agent/sampler_rb.html +0 -116
  157. data/rdoc/files/lib/new_relic/agent/samplers/cpu_sampler_rb.html +0 -101
  158. data/rdoc/files/lib/new_relic/agent/samplers/delayed_job_lock_sampler_rb.html +0 -101
  159. data/rdoc/files/lib/new_relic/agent/samplers/memory_sampler_rb.html +0 -101
  160. data/rdoc/files/lib/new_relic/agent/samplers/object_sampler_rb.html +0 -101
  161. data/rdoc/files/lib/new_relic/agent/shim_agent_rb.html +0 -108
  162. data/rdoc/files/lib/new_relic/agent/stats_engine/metric_stats_rb.html +0 -101
  163. data/rdoc/files/lib/new_relic/agent/stats_engine/samplers_rb.html +0 -101
  164. data/rdoc/files/lib/new_relic/agent/stats_engine/transactions_rb.html +0 -101
  165. data/rdoc/files/lib/new_relic/agent/stats_engine_rb.html +0 -110
  166. data/rdoc/files/lib/new_relic/agent/transaction_sampler_rb.html +0 -101
  167. data/rdoc/files/lib/new_relic/agent/worker_loop_rb.html +0 -101
  168. data/rdoc/files/lib/new_relic/agent_rb.html +0 -204
  169. data/rdoc/files/lib/new_relic/commands/deployments_rb.html +0 -119
  170. data/rdoc/files/lib/new_relic/commands/new_relic_commands_rb.html +0 -108
  171. data/rdoc/files/lib/new_relic/control/external_rb.html +0 -117
  172. data/rdoc/files/lib/new_relic/control/merb_rb.html +0 -101
  173. data/rdoc/files/lib/new_relic/control/rails_rb.html +0 -108
  174. data/rdoc/files/lib/new_relic/control/ruby_rb.html +0 -110
  175. data/rdoc/files/lib/new_relic/control/sinatra_rb.html +0 -108
  176. data/rdoc/files/lib/new_relic/control_rb.html +0 -116
  177. data/rdoc/files/lib/new_relic/delayed_job_injection_rb.html +0 -180
  178. data/rdoc/files/lib/new_relic/histogram_rb.html +0 -114
  179. data/rdoc/files/lib/new_relic/local_environment_rb.html +0 -111
  180. data/rdoc/files/lib/new_relic/merbtasks_rb.html +0 -101
  181. data/rdoc/files/lib/new_relic/metric_data_rb.html +0 -101
  182. data/rdoc/files/lib/new_relic/metric_parser/action_mailer_rb.html +0 -101
  183. data/rdoc/files/lib/new_relic/metric_parser/active_merchant_rb.html +0 -101
  184. data/rdoc/files/lib/new_relic/metric_parser/active_record_rb.html +0 -101
  185. data/rdoc/files/lib/new_relic/metric_parser/controller_cpu_rb.html +0 -101
  186. data/rdoc/files/lib/new_relic/metric_parser/controller_rb.html +0 -101
  187. data/rdoc/files/lib/new_relic/metric_parser/errors_rb.html +0 -101
  188. data/rdoc/files/lib/new_relic/metric_parser/external_rb.html +0 -101
  189. data/rdoc/files/lib/new_relic/metric_parser/mem_cache_rb.html +0 -101
  190. data/rdoc/files/lib/new_relic/metric_parser/other_transaction_rb.html +0 -108
  191. data/rdoc/files/lib/new_relic/metric_parser/view_rb.html +0 -101
  192. data/rdoc/files/lib/new_relic/metric_parser/web_frontend_rb.html +0 -107
  193. data/rdoc/files/lib/new_relic/metric_parser/web_service_rb.html +0 -101
  194. data/rdoc/files/lib/new_relic/metric_parser_rb.html +0 -101
  195. data/rdoc/files/lib/new_relic/metric_spec_rb.html +0 -108
  196. data/rdoc/files/lib/new_relic/metrics_rb.html +0 -101
  197. data/rdoc/files/lib/new_relic/noticed_error_rb.html +0 -107
  198. data/rdoc/files/lib/new_relic/rack/metric_app_rb.html +0 -108
  199. data/rdoc/files/lib/new_relic/rack_app_rb.html +0 -110
  200. data/rdoc/files/lib/new_relic/recipes_rb.html +0 -128
  201. data/rdoc/files/lib/new_relic/stats_rb.html +0 -101
  202. data/rdoc/files/lib/new_relic/transaction_analysis_rb.html +0 -108
  203. data/rdoc/files/lib/new_relic/transaction_sample_rb.html +0 -101
  204. data/rdoc/files/lib/new_relic/version_rb.html +0 -101
  205. data/rdoc/files/lib/new_relic_api_rb.html +0 -145
  206. data/rdoc/files/lib/newrelic_rpm_rb.html +0 -147
  207. data/rdoc/files/lib/tasks/all_rb.html +0 -107
  208. data/rdoc/fr_class_index.html +0 -134
  209. data/rdoc/fr_file_index.html +0 -103
  210. data/rdoc/fr_method_index.html +0 -568
  211. data/rdoc/index.html +0 -24
  212. data/rdoc/rdoc-style.css +0 -208
@@ -1,144 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Module: NewRelic::Histogram::Shim</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">NewRelic::Histogram::Shim</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/lib/new_relic/histogram_rb.html">
59
- lib/new_relic/histogram.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- </table>
66
- </div>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
-
71
-
72
-
73
- <div id="contextContent">
74
-
75
- <div id="description">
76
- <p>
77
- Used to stub out API methods when the agent is not enabled
78
- </p>
79
-
80
- </div>
81
-
82
-
83
- </div>
84
-
85
- <div id="method-list">
86
- <h3 class="section-bar">Methods</h3>
87
-
88
- <div class="name-list">
89
- <a href="#M000517">process</a>&nbsp;&nbsp;
90
- </div>
91
- </div>
92
-
93
- </div>
94
-
95
-
96
- <!-- if includes -->
97
-
98
- <div id="section">
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
- <!-- if method_list -->
108
- <div id="methods">
109
- <h3 class="section-bar">Public Instance methods</h3>
110
-
111
- <div id="method-M000517" class="method-detail">
112
- <a name="M000517"></a>
113
-
114
- <div class="method-heading">
115
- <a href="#M000517" class="method-signature">
116
- <span class="method-name">process</span><span class="method-args">(response_time)</span>
117
- </a>
118
- </div>
119
-
120
- <div class="method-description">
121
- <p><a class="source-toggle" href="#"
122
- onclick="toggleCode('M000517-source');return false;">[Source]</a></p>
123
- <div class="method-source-code" id="M000517-source">
124
- <pre>
125
- <span class="ruby-comment cmt"># File lib/new_relic/histogram.rb, line 12</span>
126
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">response_time</span>); <span class="ruby-keyword kw">end</span>
127
- </pre>
128
- </div>
129
- </div>
130
- </div>
131
-
132
-
133
- </div>
134
-
135
-
136
- </div>
137
-
138
-
139
- <div id="validator-badges">
140
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
141
- </div>
142
-
143
- </body>
144
- </html>
@@ -1,572 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: NewRelic::LocalEnvironment</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">NewRelic::LocalEnvironment</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/new_relic/local_environment_rb.html">
59
- lib/new_relic/local_environment.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <p>
83
- An instance of <a href="LocalEnvironment.html">LocalEnvironment</a> is
84
- responsible for determining three things:
85
- </p>
86
- <ul>
87
- <li>Framework - :rails, :merb, :ruby, :external, :test
88
-
89
- </li>
90
- <li>Dispatcher - A supported dispatcher, or nil (:<a
91
- href="LocalEnvironment.html#M000532">mongrel</a>, :thin, :passenger,
92
- :webrick, etc)
93
-
94
- </li>
95
- <li>Dispatcher Instance ID, which distinguishes agents on a single host from
96
- each other
97
-
98
- </li>
99
- </ul>
100
- <p>
101
- If the environment can&#8216;t be determined, it will be set to nil and <a
102
- href="LocalEnvironment.html#M000529">dispatcher_instance_id</a> will have
103
- nil.
104
- </p>
105
- <p>
106
- <a href="LocalEnvironment.html">NewRelic::LocalEnvironment</a> should be
107
- accessed through NewRelic::Control#env (via the <a
108
- href="Control.html">NewRelic::Control</a> singleton).
109
- </p>
110
-
111
- </div>
112
-
113
-
114
- </div>
115
-
116
- <div id="method-list">
117
- <h3 class="section-bar">Methods</h3>
118
-
119
- <div class="name-list">
120
- <a href="#M000526">append_environment_value</a>&nbsp;&nbsp;
121
- <a href="#M000527">append_gem_list</a>&nbsp;&nbsp;
122
- <a href="#M000528">append_plugin_list</a>&nbsp;&nbsp;
123
- <a href="#M000534">delayed_worker=</a>&nbsp;&nbsp;
124
- <a href="#M000529">dispatcher_instance_id</a>&nbsp;&nbsp;
125
- <a href="#M000530">gather_environment_info</a>&nbsp;&nbsp;
126
- <a href="#M000532">mongrel</a>&nbsp;&nbsp;
127
- <a href="#M000525">new</a>&nbsp;&nbsp;
128
- <a href="#M000531">snapshot</a>&nbsp;&nbsp;
129
- <a href="#M000535">to_s</a>&nbsp;&nbsp;
130
- <a href="#M000533">unicorn</a>&nbsp;&nbsp;
131
- </div>
132
- </div>
133
-
134
- </div>
135
-
136
-
137
- <!-- if includes -->
138
-
139
- <div id="section">
140
-
141
-
142
-
143
- <div id="aliases-list">
144
- <h3 class="section-bar">External Aliases</h3>
145
-
146
- <div class="name-list">
147
- <table summary="aliases">
148
- <tr class="top-aligned-row context-row">
149
- <td class="context-item-name">dispatcher</td>
150
- <td>-&gt;</td>
151
- <td class="context-item-value">environment</td>
152
- </tr>
153
- </table>
154
- </div>
155
- </div>
156
-
157
-
158
- <div id="attribute-list">
159
- <h3 class="section-bar">Attributes</h3>
160
-
161
- <div class="name-list">
162
- <table>
163
- <tr class="top-aligned-row context-row">
164
- <td class="context-item-name">dispatcher</td>
165
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
166
- <td class="context-item-desc"></td>
167
- </tr>
168
- <tr class="top-aligned-row context-row">
169
- <td class="context-item-name">dispatcher_instance_id</td>
170
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
171
- <td class="context-item-desc"></td>
172
- </tr>
173
- <tr class="top-aligned-row context-row">
174
- <td class="context-item-name">framework</td>
175
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
176
- <td class="context-item-desc"></td>
177
- </tr>
178
- <tr class="top-aligned-row context-row">
179
- <td class="context-item-name">mongrel</td>
180
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
181
- <td class="context-item-desc"></td>
182
- </tr>
183
- <tr class="top-aligned-row context-row">
184
- <td class="context-item-name">processors</td>
185
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
186
- <td class="context-item-desc"></td>
187
- </tr>
188
- </table>
189
- </div>
190
- </div>
191
-
192
-
193
-
194
- <!-- if method_list -->
195
- <div id="methods">
196
- <h3 class="section-bar">Public Class methods</h3>
197
-
198
- <div id="method-M000525" class="method-detail">
199
- <a name="M000525"></a>
200
-
201
- <div class="method-heading">
202
- <a href="#M000525" class="method-signature">
203
- <span class="method-name">new</span><span class="method-args">()</span>
204
- </a>
205
- </div>
206
-
207
- <div class="method-description">
208
- <p><a class="source-toggle" href="#"
209
- onclick="toggleCode('M000525-source');return false;">[Source]</a></p>
210
- <div class="method-source-code" id="M000525-source">
211
- <pre>
212
- <span class="ruby-comment cmt"># File lib/new_relic/local_environment.rb, line 25</span>
213
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
214
- <span class="ruby-comment cmt"># Extend self with any any submodules of LocalEnvironment. These can override</span>
215
- <span class="ruby-comment cmt"># the discover methods to discover new framworks and dispatchers. </span>
216
- <span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">LocalEnvironment</span>.<span class="ruby-identifier">constants</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">const</span> <span class="ruby-operator">|</span>
217
- <span class="ruby-identifier">mod</span> = <span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">LocalEnvironment</span>.<span class="ruby-identifier">const_get</span> <span class="ruby-identifier">const</span>
218
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">extend</span> <span class="ruby-identifier">mod</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">mod</span>.<span class="ruby-identifier">instance_of?</span> <span class="ruby-constant">Module</span>
219
- <span class="ruby-keyword kw">end</span>
220
-
221
- <span class="ruby-identifier">discover_framework</span>
222
- <span class="ruby-identifier">discover_dispatcher</span>
223
- <span class="ruby-ivar">@dispatcher</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@dispatcher</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:none</span>
224
- <span class="ruby-ivar">@gems</span> = <span class="ruby-constant">Set</span>.<span class="ruby-identifier">new</span>
225
- <span class="ruby-ivar">@plugins</span> = <span class="ruby-constant">Set</span>.<span class="ruby-identifier">new</span>
226
- <span class="ruby-ivar">@config</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
227
- <span class="ruby-keyword kw">end</span>
228
- </pre>
229
- </div>
230
- </div>
231
- </div>
232
-
233
- <h3 class="section-bar">Public Instance methods</h3>
234
-
235
- <div id="method-M000526" class="method-detail">
236
- <a name="M000526"></a>
237
-
238
- <div class="method-heading">
239
- <a href="#M000526" class="method-signature">
240
- <span class="method-name">append_environment_value</span><span class="method-args">(name, value = nil) {|if block_given?| ...}</span>
241
- </a>
242
- </div>
243
-
244
- <div class="method-description">
245
- <p>
246
- Add the given key/value pair to the app environment settings. Must pass
247
- either a value or a block. Block is called to get the value and any raised
248
- errors are silently ignored.
249
- </p>
250
- <p><a class="source-toggle" href="#"
251
- onclick="toggleCode('M000526-source');return false;">[Source]</a></p>
252
- <div class="method-source-code" id="M000526-source">
253
- <pre>
254
- <span class="ruby-comment cmt"># File lib/new_relic/local_environment.rb, line 45</span>
255
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">append_environment_value</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span> = <span class="ruby-keyword kw">nil</span>
256
- <span class="ruby-identifier">value</span> = <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
257
- <span class="ruby-ivar">@config</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>
258
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span>
259
- <span class="ruby-comment cmt"># puts &quot;#{e}\n #{e.backtrace.join(&quot;\n &quot;)}&quot; </span>
260
- <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@framework</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:test</span>
261
- <span class="ruby-keyword kw">end</span>
262
- </pre>
263
- </div>
264
- </div>
265
- </div>
266
-
267
- <div id="method-M000527" class="method-detail">
268
- <a name="M000527"></a>
269
-
270
- <div class="method-heading">
271
- <a href="#M000527" class="method-signature">
272
- <span class="method-name">append_gem_list</span><span class="method-args">() {|| ...}</span>
273
- </a>
274
- </div>
275
-
276
- <div class="method-description">
277
- <p><a class="source-toggle" href="#"
278
- onclick="toggleCode('M000527-source');return false;">[Source]</a></p>
279
- <div class="method-source-code" id="M000527-source">
280
- <pre>
281
- <span class="ruby-comment cmt"># File lib/new_relic/local_environment.rb, line 53</span>
282
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">append_gem_list</span>
283
- <span class="ruby-ivar">@gems</span> <span class="ruby-operator">+=</span> <span class="ruby-keyword kw">yield</span>
284
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
285
- <span class="ruby-comment cmt"># puts &quot;#{e}\n #{e.backtrace.join(&quot;\n &quot;)}&quot;</span>
286
- <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@framework</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:test</span>
287
- <span class="ruby-keyword kw">end</span>
288
- </pre>
289
- </div>
290
- </div>
291
- </div>
292
-
293
- <div id="method-M000528" class="method-detail">
294
- <a name="M000528"></a>
295
-
296
- <div class="method-heading">
297
- <a href="#M000528" class="method-signature">
298
- <span class="method-name">append_plugin_list</span><span class="method-args">() {|| ...}</span>
299
- </a>
300
- </div>
301
-
302
- <div class="method-description">
303
- <p><a class="source-toggle" href="#"
304
- onclick="toggleCode('M000528-source');return false;">[Source]</a></p>
305
- <div class="method-source-code" id="M000528-source">
306
- <pre>
307
- <span class="ruby-comment cmt"># File lib/new_relic/local_environment.rb, line 60</span>
308
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">append_plugin_list</span>
309
- <span class="ruby-ivar">@plugins</span> <span class="ruby-operator">+=</span> <span class="ruby-keyword kw">yield</span>
310
- <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span>
311
- <span class="ruby-comment cmt"># puts &quot;#{e}\n #{e.backtrace.join(&quot;\n &quot;)}&quot; </span>
312
- <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@framework</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:test</span>
313
- <span class="ruby-keyword kw">end</span>
314
- </pre>
315
- </div>
316
- </div>
317
- </div>
318
-
319
- <div id="method-M000534" class="method-detail">
320
- <a name="M000534"></a>
321
-
322
- <div class="method-heading">
323
- <a href="#M000534" class="method-signature">
324
- <span class="method-name">delayed_worker=</span><span class="method-args">(worker)</span>
325
- </a>
326
- </div>
327
-
328
- <div class="method-description">
329
- <p>
330
- Obsolete method for DelayedJob instrumentation support, which is now in the
331
- rpm_contrib gem.
332
- </p>
333
- <p><a class="source-toggle" href="#"
334
- onclick="toggleCode('M000534-source');return false;">[Source]</a></p>
335
- <div class="method-source-code" id="M000534-source">
336
- <pre>
337
- <span class="ruby-comment cmt"># File lib/new_relic/local_environment.rb, line 156</span>
338
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delayed_worker=</span>(<span class="ruby-identifier">worker</span>)
339
- <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;WARNING: DelayedJob instrumentation has been moved to the rpm_contrib gem.&quot;</span>
340
- <span class="ruby-keyword kw">end</span>
341
- </pre>
342
- </div>
343
- </div>
344
- </div>
345
-
346
- <div id="method-M000529" class="method-detail">
347
- <a name="M000529"></a>
348
-
349
- <div class="method-heading">
350
- <a href="#M000529" class="method-signature">
351
- <span class="method-name">dispatcher_instance_id</span><span class="method-args">()</span>
352
- </a>
353
- </div>
354
-
355
- <div class="method-description">
356
- <p><a class="source-toggle" href="#"
357
- onclick="toggleCode('M000529-source');return false;">[Source]</a></p>
358
- <div class="method-source-code" id="M000529-source">
359
- <pre>
360
- <span class="ruby-comment cmt"># File lib/new_relic/local_environment.rb, line 67</span>
361
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dispatcher_instance_id</span>
362
- <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@dispatcher_instance_id</span>.<span class="ruby-identifier">nil?</span>
363
- <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@dispatcher</span>.<span class="ruby-identifier">nil?</span>
364
- <span class="ruby-ivar">@dispatcher_instance_id</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">$0</span>).<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;.&quot;</span>).<span class="ruby-identifier">first</span>
365
- <span class="ruby-keyword kw">end</span>
366
- <span class="ruby-keyword kw">end</span>
367
- <span class="ruby-ivar">@dispatcher_instance_id</span>
368
- <span class="ruby-keyword kw">end</span>
369
- </pre>
370
- </div>
371
- </div>
372
- </div>
373
-
374
- <div id="method-M000530" class="method-detail">
375
- <a name="M000530"></a>
376
-
377
- <div class="method-heading">
378
- <a href="#M000530" class="method-signature">
379
- <span class="method-name">gather_environment_info</span><span class="method-args">()</span>
380
- </a>
381
- </div>
382
-
383
- <div class="method-description">
384
- <p>
385
- Collect base statistics about the environment and record them for
386
- comparison and change detection.
387
- </p>
388
- <p><a class="source-toggle" href="#"
389
- onclick="toggleCode('M000530-source');return false;">[Source]</a></p>
390
- <div class="method-source-code" id="M000530-source">
391
- <pre>
392
- <span class="ruby-comment cmt"># File lib/new_relic/local_environment.rb, line 78</span>
393
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gather_environment_info</span>
394
- <span class="ruby-identifier">append_environment_value</span> <span class="ruby-value str">'Framework'</span>, <span class="ruby-ivar">@framework</span>.<span class="ruby-identifier">to_s</span>
395
- <span class="ruby-identifier">append_environment_value</span> <span class="ruby-value str">'Dispatcher'</span>, <span class="ruby-ivar">@dispatcher</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@dispatcher</span>
396
- <span class="ruby-identifier">append_environment_value</span> <span class="ruby-value str">'Dispatcher instance id'</span>, <span class="ruby-ivar">@dispatcher_instance_id</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@dispatcher_instance_id</span>
397
- <span class="ruby-identifier">append_environment_value</span>(<span class="ruby-value str">'Application root'</span>) { <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Control</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">root</span>) }
398
- <span class="ruby-identifier">append_environment_value</span>(<span class="ruby-value str">'Ruby version'</span>){ <span class="ruby-constant">RUBY_VERSION</span> }
399
- <span class="ruby-identifier">append_environment_value</span>(<span class="ruby-value str">'Ruby description'</span>){ <span class="ruby-constant">RUBY_DESCRIPTION</span> } <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span> <span class="ruby-operator">::</span><span class="ruby-constant">RUBY_DESCRIPTION</span>
400
- <span class="ruby-identifier">append_environment_value</span>(<span class="ruby-value str">'Ruby platform'</span>) { <span class="ruby-constant">RUBY_PLATFORM</span> }
401
- <span class="ruby-identifier">append_environment_value</span>(<span class="ruby-value str">'Ruby patchlevel'</span>) { <span class="ruby-constant">RUBY_PATCHLEVEL</span> }
402
- <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span> <span class="ruby-operator">::</span><span class="ruby-constant">JRUBY_VERSION</span>
403
- <span class="ruby-identifier">append_environment_value</span>(<span class="ruby-value str">'JRuby version'</span>) { <span class="ruby-constant">JRUBY_VERSION</span> }
404
- <span class="ruby-identifier">append_environment_value</span>(<span class="ruby-value str">'Java VM version'</span>) { <span class="ruby-constant">ENV_JAVA</span>[<span class="ruby-value str">'java.vm.version'</span>]}
405
- <span class="ruby-keyword kw">end</span>
406
- <span class="ruby-identifier">append_environment_value</span>(<span class="ruby-value str">'OS version'</span>) { <span class="ruby-value">`uname -v`</span> }
407
- <span class="ruby-identifier">append_environment_value</span>(<span class="ruby-value str">'OS'</span>) { <span class="ruby-value">`uname -s`</span> } <span class="ruby-operator">||</span>
408
- <span class="ruby-identifier">append_environment_value</span>(<span class="ruby-value str">'OS'</span>) { <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'OS'</span>] }
409
- <span class="ruby-identifier">append_environment_value</span>(<span class="ruby-value str">'Arch'</span>) { <span class="ruby-value">`uname -p`</span> } <span class="ruby-operator">||</span>
410
- <span class="ruby-identifier">append_environment_value</span>(<span class="ruby-value str">'Arch'</span>) { <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'PROCESSOR_ARCHITECTURE'</span>] }
411
- <span class="ruby-comment cmt"># See what the number of cpus is, works only on linux.</span>
412
- <span class="ruby-ivar">@processors</span> = <span class="ruby-identifier">append_environment_value</span>(<span class="ruby-value str">'Processors'</span>) <span class="ruby-keyword kw">do</span>
413
- <span class="ruby-identifier">processors</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">readlines</span>(<span class="ruby-value str">'/proc/cpuinfo'</span>).<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^processor\s*:/</span> }.<span class="ruby-identifier">size</span>
414
- <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Cannot determine the number of processors in /proc/cpuinfo&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">processors</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
415
- <span class="ruby-identifier">processors</span>
416
- <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">readable?</span> <span class="ruby-value str">'/proc/cpuinfo'</span>
417
- <span class="ruby-comment cmt"># The current Rails environment (development, test, or production).</span>
418
- <span class="ruby-identifier">append_environment_value</span>(<span class="ruby-value str">'Environment'</span>) { <span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Control</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">env</span> }
419
- <span class="ruby-comment cmt"># Look for a capistrano file indicating the current revision:</span>
420
- <span class="ruby-identifier">rev_file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">NewRelic</span><span class="ruby-operator">::</span><span class="ruby-constant">Control</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">root</span>, <span class="ruby-value str">&quot;REVISION&quot;</span>)
421
- <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">readable?</span>(<span class="ruby-identifier">rev_file</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">size</span>(<span class="ruby-identifier">rev_file</span>) <span class="ruby-operator">&lt;</span> <span class="ruby-value">64</span>
422
- <span class="ruby-identifier">append_environment_value</span>(<span class="ruby-value str">'Revision'</span>) <span class="ruby-keyword kw">do</span>
423
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">rev_file</span>) { <span class="ruby-operator">|</span> <span class="ruby-identifier">file</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">file</span>.<span class="ruby-identifier">readline</span>.<span class="ruby-identifier">strip</span> }
424
- <span class="ruby-keyword kw">end</span>
425
- <span class="ruby-keyword kw">end</span>
426
- <span class="ruby-comment cmt"># The name of the database adapter for the current environment.</span>
427
- <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span> <span class="ruby-operator">::</span><span class="ruby-constant">ActiveRecord</span>
428
- <span class="ruby-identifier">append_environment_value</span> <span class="ruby-value str">'Database adapter'</span> <span class="ruby-keyword kw">do</span>
429
- <span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">configurations</span>[<span class="ruby-constant">RAILS_ENV</span>][<span class="ruby-value str">'adapter'</span>]
430
- <span class="ruby-keyword kw">end</span>
431
- <span class="ruby-identifier">append_environment_value</span> <span class="ruby-value str">'Database schema version'</span> <span class="ruby-keyword kw">do</span>
432
- <span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">Migrator</span>.<span class="ruby-identifier">current_version</span>
433
- <span class="ruby-keyword kw">end</span>
434
- <span class="ruby-keyword kw">end</span>
435
- <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span> <span class="ruby-operator">::</span><span class="ruby-constant">DataMapper</span>
436
- <span class="ruby-identifier">append_environment_value</span> <span class="ruby-value str">'DataMapper version'</span> <span class="ruby-keyword kw">do</span>
437
- <span class="ruby-identifier">require</span> <span class="ruby-value str">'dm-core/version'</span>
438
- <span class="ruby-constant">DataMapper</span><span class="ruby-operator">::</span><span class="ruby-constant">VERSION</span>
439
- <span class="ruby-keyword kw">end</span>
440
- <span class="ruby-keyword kw">end</span>
441
- <span class="ruby-keyword kw">end</span>
442
- </pre>
443
- </div>
444
- </div>
445
- </div>
446
-
447
- <div id="method-M000532" class="method-detail">
448
- <a name="M000532"></a>
449
-
450
- <div class="method-heading">
451
- <a href="#M000532" class="method-signature">
452
- <span class="method-name">mongrel</span><span class="method-args">()</span>
453
- </a>
454
- </div>
455
-
456
- <div class="method-description">
457
- <p><a class="source-toggle" href="#"
458
- onclick="toggleCode('M000532-source');return false;">[Source]</a></p>
459
- <div class="method-source-code" id="M000532-source">
460
- <pre>
461
- <span class="ruby-comment cmt"># File lib/new_relic/local_environment.rb, line 136</span>
462
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mongrel</span>
463
- <span class="ruby-comment cmt"># Note that the odd defined? sequence is necessary to work around a bug in an older version</span>
464
- <span class="ruby-comment cmt"># of JRuby.</span>
465
- <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@mongrel</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@mongrel</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span> (<span class="ruby-keyword kw">defined?</span>(<span class="ruby-operator">::</span><span class="ruby-constant">Mongrel</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-operator">::</span><span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">HttpServer</span>))
466
- <span class="ruby-constant">ObjectSpace</span>.<span class="ruby-identifier">each_object</span>(<span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">HttpServer</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mongrel</span><span class="ruby-operator">|</span>
467
- <span class="ruby-ivar">@mongrel</span> = <span class="ruby-identifier">mongrel</span>
468
- <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-operator">::</span><span class="ruby-constant">JRuby</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-constant">JRuby</span>.<span class="ruby-identifier">runtime</span>.<span class="ruby-identifier">is_object_space_enabled</span>
469
- <span class="ruby-ivar">@mongrel</span>
470
- <span class="ruby-keyword kw">end</span>
471
- </pre>
472
- </div>
473
- </div>
474
- </div>
475
-
476
- <div id="method-M000531" class="method-detail">
477
- <a name="M000531"></a>
478
-
479
- <div class="method-heading">
480
- <a href="#M000531" class="method-signature">
481
- <span class="method-name">snapshot</span><span class="method-args">()</span>
482
- </a>
483
- </div>
484
-
485
- <div class="method-description">
486
- <p>
487
- Take a <a href="LocalEnvironment.html#M000531">snapshot</a> of the
488
- environment information for this application Returns an associative array
489
- </p>
490
- <p><a class="source-toggle" href="#"
491
- onclick="toggleCode('M000531-source');return false;">[Source]</a></p>
492
- <div class="method-source-code" id="M000531-source">
493
- <pre>
494
- <span class="ruby-comment cmt"># File lib/new_relic/local_environment.rb, line 129</span>
495
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">snapshot</span>
496
- <span class="ruby-identifier">i</span> = <span class="ruby-ivar">@config</span>.<span class="ruby-identifier">to_a</span>
497
- <span class="ruby-identifier">i</span> <span class="ruby-operator">&lt;&lt;</span> [ <span class="ruby-value str">'Plugin List'</span>, <span class="ruby-ivar">@plugins</span>.<span class="ruby-identifier">to_a</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@plugins</span>.<span class="ruby-identifier">empty?</span>
498
- <span class="ruby-identifier">i</span> <span class="ruby-operator">&lt;&lt;</span> [ <span class="ruby-value str">'Gems'</span>, <span class="ruby-ivar">@gems</span>.<span class="ruby-identifier">to_a</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@gems</span>.<span class="ruby-identifier">empty?</span>
499
- <span class="ruby-identifier">i</span>
500
- <span class="ruby-keyword kw">end</span>
501
- </pre>
502
- </div>
503
- </div>
504
- </div>
505
-
506
- <div id="method-M000535" class="method-detail">
507
- <a name="M000535"></a>
508
-
509
- <div class="method-heading">
510
- <a href="#M000535" class="method-signature">
511
- <span class="method-name">to_s</span><span class="method-args">()</span>
512
- </a>
513
- </div>
514
-
515
- <div class="method-description">
516
- <p><a class="source-toggle" href="#"
517
- onclick="toggleCode('M000535-source');return false;">[Source]</a></p>
518
- <div class="method-source-code" id="M000535-source">
519
- <pre>
520
- <span class="ruby-comment cmt"># File lib/new_relic/local_environment.rb, line 314</span>
521
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
522
- <span class="ruby-identifier">s</span> = <span class="ruby-value str">&quot;LocalEnvironment[&quot;</span>
523
- <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@framework</span>.<span class="ruby-identifier">to_s</span>
524
- <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;;dispatcher=#{@dispatcher}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@dispatcher</span>
525
- <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;;instance=#{@dispatcher_instance_id}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@dispatcher_instance_id</span>
526
- <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;]&quot;</span>
527
- <span class="ruby-keyword kw">end</span>
528
- </pre>
529
- </div>
530
- </div>
531
- </div>
532
-
533
- <div id="method-M000533" class="method-detail">
534
- <a name="M000533"></a>
535
-
536
- <div class="method-heading">
537
- <a href="#M000533" class="method-signature">
538
- <span class="method-name">unicorn</span><span class="method-args">()</span>
539
- </a>
540
- </div>
541
-
542
- <div class="method-description">
543
- <p><a class="source-toggle" href="#"
544
- onclick="toggleCode('M000533-source');return false;">[Source]</a></p>
545
- <div class="method-source-code" id="M000533-source">
546
- <pre>
547
- <span class="ruby-comment cmt"># File lib/new_relic/local_environment.rb, line 146</span>
548
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unicorn</span>
549
- <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@unicorn</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@unicorn</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span> (<span class="ruby-keyword kw">defined?</span>(<span class="ruby-operator">::</span><span class="ruby-constant">Unicorn</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-operator">::</span><span class="ruby-constant">Unicorn</span><span class="ruby-operator">::</span><span class="ruby-constant">HttpServer</span>))
550
- <span class="ruby-constant">ObjectSpace</span>.<span class="ruby-identifier">each_object</span>(<span class="ruby-constant">Unicorn</span><span class="ruby-operator">::</span><span class="ruby-constant">HttpServer</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">unicorn</span><span class="ruby-operator">|</span>
551
- <span class="ruby-ivar">@unicorn</span> = <span class="ruby-identifier">unicorn</span>
552
- <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-operator">::</span><span class="ruby-constant">JRuby</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-constant">JRuby</span>.<span class="ruby-identifier">runtime</span>.<span class="ruby-identifier">is_object_space_enabled</span>
553
- <span class="ruby-ivar">@unicorn</span>
554
- <span class="ruby-keyword kw">end</span>
555
- </pre>
556
- </div>
557
- </div>
558
- </div>
559
-
560
-
561
- </div>
562
-
563
-
564
- </div>
565
-
566
-
567
- <div id="validator-badges">
568
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
569
- </div>
570
-
571
- </body>
572
- </html>