rack-perftools_profiler 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/test/test_helper.rb CHANGED
@@ -9,20 +9,26 @@ require 'rack/perftools_profiler'
9
9
 
10
10
  class Test::Unit::TestCase
11
11
 
12
+ def assert_ok status, body
13
+ unless status == 200
14
+ raise RuntimeError, body
15
+ end
16
+ end
17
+
12
18
  end
13
19
 
14
20
  ITERATIONS = case RUBY_VERSION
15
- # Ruby 1.9.x is so fast that we need to add extra iterations
21
+ # Ruby 1.9.x is so fast that we need to add extra iterations
16
22
  # to get profiling data
17
23
  when /1\.9\../
18
- 350_000
19
- else
24
+ 350_000
25
+ else
20
26
  35_000
21
27
  end
22
28
 
23
29
  # From the Rack spec (http://rack.rubyforge.org/doc/files/SPEC.html) :
24
30
  # The Body must respond to each and must only yield String values. The Body should not be an instance of String.
25
- # ... The Body commonly is an Array of Strings, the application instance itself, or a File-like object.
31
+ # ... The Body commonly is an Array of Strings, the application instance itself, or a File-like object.
26
32
 
27
33
  class RackResponseBody
28
34
  include Test::Unit::Assertions
@@ -52,7 +58,7 @@ class TestApp
52
58
  end
53
59
  GC.start
54
60
  when /method2/
55
- ITERATIONS.times do
61
+ ITERATIONS.times do
56
62
  self.class.new.method2
57
63
  end
58
64
  GC.start
@@ -61,7 +67,7 @@ class TestApp
61
67
  end
62
68
 
63
69
  def method1
64
- 100.times do
70
+ 100.times do
65
71
  1+2+3+4+5
66
72
  end
67
73
  end
metadata CHANGED
@@ -1,127 +1,105 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rack-perftools_profiler
3
- version: !ruby/object:Gem::Version
4
- hash: 11
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.1
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 5
9
- - 0
10
- version: 0.5.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Ben Brinckerhoff
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-07-25 00:00:00 -06:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2011-12-12 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: perftools.rb
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70106176711820 !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
18
+ requirements:
27
19
  - - ~>
28
- - !ruby/object:Gem::Version
29
- hash: 7
30
- segments:
31
- - 0
32
- - 5
33
- - 6
20
+ - !ruby/object:Gem::Version
34
21
  version: 0.5.6
35
22
  type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: rack
39
23
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70106176711820
25
+ - !ruby/object:Gem::Dependency
26
+ name: rack
27
+ requirement: &70106176709780 !ruby/object:Gem::Requirement
41
28
  none: false
42
- requirements:
29
+ requirements:
43
30
  - - ~>
44
- - !ruby/object:Gem::Version
45
- hash: 15
46
- segments:
47
- - 1
48
- - 0
49
- version: "1.0"
31
+ - !ruby/object:Gem::Version
32
+ version: '1.0'
50
33
  type: :runtime
51
- version_requirements: *id002
52
- - !ruby/object:Gem::Dependency
53
- name: open4
54
34
  prerelease: false
55
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *70106176709780
36
+ - !ruby/object:Gem::Dependency
37
+ name: open4
38
+ requirement: &70106176708100 !ruby/object:Gem::Requirement
56
39
  none: false
57
- requirements:
40
+ requirements:
58
41
  - - ~>
59
- - !ruby/object:Gem::Version
60
- hash: 15
61
- segments:
62
- - 1
63
- - 0
64
- version: "1.0"
42
+ - !ruby/object:Gem::Version
43
+ version: '1.0'
65
44
  type: :runtime
66
- version_requirements: *id003
67
- - !ruby/object:Gem::Dependency
68
- name: rack
69
45
  prerelease: false
70
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *70106176708100
47
+ - !ruby/object:Gem::Dependency
48
+ name: rack
49
+ requirement: &70106176705760 !ruby/object:Gem::Requirement
71
50
  none: false
72
- requirements:
51
+ requirements:
73
52
  - - ~>
74
- - !ruby/object:Gem::Version
75
- hash: 13
76
- segments:
77
- - 1
78
- - 1
79
- version: "1.1"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.1'
80
55
  type: :development
81
- version_requirements: *id004
82
- - !ruby/object:Gem::Dependency
83
- name: shoulda
84
56
  prerelease: false
85
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *70106176705760
58
+ - !ruby/object:Gem::Dependency
59
+ name: shoulda
60
+ requirement: &70106176701740 !ruby/object:Gem::Requirement
86
61
  none: false
87
- requirements:
62
+ requirements:
88
63
  - - ~>
89
- - !ruby/object:Gem::Version
90
- hash: 23
91
- segments:
92
- - 2
93
- - 10
94
- version: "2.10"
64
+ - !ruby/object:Gem::Version
65
+ version: '2.10'
95
66
  type: :development
96
- version_requirements: *id005
97
- - !ruby/object:Gem::Dependency
67
+ prerelease: false
68
+ version_requirements: *70106176701740
69
+ - !ruby/object:Gem::Dependency
98
70
  name: mocha
71
+ requirement: &70106176698100 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ~>
75
+ - !ruby/object:Gem::Version
76
+ version: '0.9'
77
+ type: :development
99
78
  prerelease: false
100
- requirement: &id006 !ruby/object:Gem::Requirement
79
+ version_requirements: *70106176698100
80
+ - !ruby/object:Gem::Dependency
81
+ name: rake
82
+ requirement: &70106176695780 !ruby/object:Gem::Requirement
101
83
  none: false
102
- requirements:
84
+ requirements:
103
85
  - - ~>
104
- - !ruby/object:Gem::Version
105
- hash: 25
106
- segments:
107
- - 0
108
- - 9
109
- version: "0.9"
86
+ - !ruby/object:Gem::Version
87
+ version: 0.9.2
110
88
  type: :development
111
- version_requirements: *id006
89
+ prerelease: false
90
+ version_requirements: *70106176695780
112
91
  description: Middleware for profiling Rack-compatible apps using perftools.rb
113
- email: ben@bbrinck.com
92
+ email:
93
+ - ben@bbrinck.com
114
94
  executables: []
115
-
116
95
  extensions: []
117
-
118
- extra_rdoc_files:
119
- - LICENSE
120
- - README.rdoc
121
- files:
96
+ extra_rdoc_files: []
97
+ files:
122
98
  - .document
99
+ - .gitignore
100
+ - Gemfile
123
101
  - LICENSE
124
- - README.rdoc
102
+ - README.md
125
103
  - Rakefile
126
104
  - VERSION
127
105
  - lib/rack/perftools_profiler.rb
@@ -136,45 +114,39 @@ files:
136
114
  - lib/rack/perftools_profiler/start_profiling.rb
137
115
  - lib/rack/perftools_profiler/stop_profiling.rb
138
116
  - lib/rack/perftools_profiler/utils.rb
117
+ - lib/rack/perftools_profiler/version.rb
139
118
  - rack-perftools_profiler-0.4.1.gem
140
119
  - rack-perftools_profiler.gemspec
141
120
  - test/multiple_request_profiling_test.rb
142
121
  - test/rack-perftools-profiler_test.rb
143
122
  - test/single_request_profiling_test.rb
144
123
  - test/test_helper.rb
145
- has_rdoc: true
146
124
  homepage: http://github.com/bhb/rack-perftools_profiler
147
125
  licenses: []
148
-
149
126
  post_install_message:
150
127
  rdoc_options: []
151
-
152
- require_paths:
128
+ require_paths:
153
129
  - lib
154
- required_ruby_version: !ruby/object:Gem::Requirement
130
+ required_ruby_version: !ruby/object:Gem::Requirement
155
131
  none: false
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- hash: 3
160
- segments:
161
- - 0
162
- version: "0"
163
- required_rubygems_version: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - ! '>='
134
+ - !ruby/object:Gem::Version
135
+ version: '0'
136
+ required_rubygems_version: !ruby/object:Gem::Requirement
164
137
  none: false
165
- requirements:
166
- - - ">="
167
- - !ruby/object:Gem::Version
168
- hash: 3
169
- segments:
170
- - 0
171
- version: "0"
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
172
142
  requirements: []
173
-
174
- rubyforge_project:
175
- rubygems_version: 1.6.2
143
+ rubyforge_project: rack-perftools_profiler
144
+ rubygems_version: 1.8.10
176
145
  signing_key:
177
146
  specification_version: 3
178
147
  summary: Middleware for profiling Rack-compatible apps using perftools.rb
179
- test_files: []
180
-
148
+ test_files:
149
+ - test/multiple_request_profiling_test.rb
150
+ - test/rack-perftools-profiler_test.rb
151
+ - test/single_request_profiling_test.rb
152
+ - test/test_helper.rb