newrelic_rpm 3.3.3.beta2 → 3.3.3

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.

@@ -58,7 +58,7 @@ module NewRelic
58
58
  name = '(unknown)'
59
59
  verb = http_verb(request)
60
60
 
61
- routes[verb].each do |pattern, keys, conditions, block|
61
+ Array(routes[verb]).each do |pattern, keys, conditions, block|
62
62
  if pattern = yield(pattern, keys, conditions)
63
63
  name = pattern
64
64
  end
@@ -38,8 +38,9 @@ module NewRelic
38
38
  segment = @sample.create_segment(time.to_f - @sample_start, metric_name)
39
39
  @current_segment.add_called_segment(segment)
40
40
  @current_segment = segment
41
- elsif @sample.count_segments == @segment_limit
42
- NewRelic::Control.instance.log.debug("Segment limit of #{@segment_limit} reached, ceasing collection.")
41
+ if @sample.count_segments == @segment_limit
42
+ NewRelic::Control.instance.log.debug("Segment limit of #{@segment_limit} reached, ceasing collection.")
43
+ end
43
44
  end
44
45
  end
45
46
 
@@ -4,7 +4,7 @@ module NewRelic
4
4
  MAJOR = 3
5
5
  MINOR = 3
6
6
  TINY = 3
7
- BUILD = 'beta2' # Set to nil for a release, 'beta1', 'alpha', etc for prerelease builds
7
+ BUILD = nil # 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
 
@@ -5,14 +5,14 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "newrelic_rpm"
8
- s.version = "3.3.3.beta2"
8
+ s.version = "3.3.3"
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 = "2012-03-15"
12
+ s.date = "2012-03-28"
13
13
  s.description = "New Relic is a performance management system, developed by New Relic,\nInc (http://www.newrelic.com). New Relic provides you with deep\ninformation about the performance of your web application as it runs\nin production. The New Relic Ruby Agent is dual-purposed as a either a\nGem or plugin, hosted on\nhttp://github.com/newrelic/rpm/\n"
14
14
  s.email = "support@newrelic.com"
15
- s.executables = ["newrelic", "mongrel_rpm", "newrelic_cmd"]
15
+ s.executables = ["mongrel_rpm", "newrelic", "newrelic_cmd"]
16
16
  s.extra_rdoc_files = [
17
17
  "CHANGELOG",
18
18
  "LICENSE",
@@ -203,6 +203,7 @@ Gem::Specification.new do |s|
203
203
  "test/new_relic/version_number_test.rb",
204
204
  "test/script/build_test_gem.sh",
205
205
  "test/script/ci.sh",
206
+ "test/script/ci_bench.sh",
206
207
  "test/test_contexts.rb",
207
208
  "test/test_helper.rb",
208
209
  "ui/helpers/developer_mode_helper.rb",
@@ -167,6 +167,14 @@ class NewRelic::Agent::TransationSampleBuilderTest < Test::Unit::TestCase
167
167
  8.times {|i| build_segment i.to_s }
168
168
  assert_equal 3, @builder.sample.count_segments
169
169
  end
170
+
171
+ # regression
172
+ def test_trace_should_log_segment_reached_once
173
+ @builder.segment_limit = 3
174
+ NewRelic::Control.instance.log.expects(:debug).once
175
+ 8.times {|i| build_segment i.to_s }
176
+ end
177
+
170
178
 
171
179
  def validate_builder(check_names = true)
172
180
  validate_segment @builder.sample.root_segment, check_names
@@ -0,0 +1,52 @@
1
+ #!/bin/bash
2
+
3
+ # Script to benchmark the ruby agent under various versions of ruby in ci.
4
+
5
+ echo "Executing $0"
6
+ echo "Running in $(pwd)"
7
+
8
+ # print commands in this script as they're invoked
9
+ # set -x
10
+ # fail if any command fails
11
+ set -e
12
+
13
+ # check for require environment variables
14
+ if [ "x$RUBY" == "x" ]; then
15
+ echo '$RUBY is undefined'
16
+ exit 1
17
+ fi
18
+
19
+
20
+ . "$HOME/.rvm/scripts/rvm"
21
+ rvm use $RUBY || rvm install $RUBY
22
+ echo `which ruby`
23
+
24
+ # make sure that we're in the project root
25
+ script_dirname=`dirname $0`
26
+ cd "$script_dirname/../../"
27
+ pwd
28
+
29
+ rm -rf tmp
30
+ mkdir -p tmp
31
+ cd tmp
32
+ git clone --depth=1 git@github.com:newrelic/agent_prof.git agent_prof
33
+ cd agent_prof
34
+
35
+ perl -p -i'.bak' -e 's#gem +.newrelic_rpm.*$#gem "newrelic_rpm", :path => "\.\.\/\.\.\/"#' Gemfile
36
+
37
+ rvm --force gemset delete ruby_bench_$RUBY
38
+ rvm gemset create ruby_bench_$RUBY
39
+ rvm gemset use ruby_bench_$RUBY
40
+
41
+ if [ "x$RUBY" == "x1.8.6" ]; then
42
+ # Bundler 1.1 dropped support for ruby 1.8.6
43
+ gem install bundler -v'~>1.0.0' --no-rdoc --no-ri
44
+ else
45
+ gem install bundler --no-rdoc --no-ri
46
+ fi
47
+
48
+ bundle
49
+ script/run
50
+ bundle exec script/post_log_to_dashboard
51
+
52
+
metadata CHANGED
@@ -1,15 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- hash: -3606956778
5
- prerelease: 6
4
+ hash: 13
5
+ prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 3
9
9
  - 3
10
- - beta
11
- - 2
12
- version: 3.3.3.beta2
10
+ version: 3.3.3
13
11
  platform: ruby
14
12
  authors:
15
13
  - Bill Kayser
@@ -20,7 +18,7 @@ autorequire:
20
18
  bindir: bin
21
19
  cert_chain: []
22
20
 
23
- date: 2012-03-15 00:00:00 Z
21
+ date: 2012-03-28 00:00:00 Z
24
22
  dependencies:
25
23
  - !ruby/object:Gem::Dependency
26
24
  name: jeweler
@@ -74,8 +72,8 @@ description: |
74
72
 
75
73
  email: support@newrelic.com
76
74
  executables:
77
- - newrelic
78
75
  - mongrel_rpm
76
+ - newrelic
79
77
  - newrelic_cmd
80
78
  extensions: []
81
79
 
@@ -268,6 +266,7 @@ files:
268
266
  - test/new_relic/version_number_test.rb
269
267
  - test/script/build_test_gem.sh
270
268
  - test/script/ci.sh
269
+ - test/script/ci_bench.sh
271
270
  - test/test_contexts.rb
272
271
  - test/test_helper.rb
273
272
  - ui/helpers/developer_mode_helper.rb