We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6f2da5 commit ea05b1aCopy full SHA for ea05b1a
1 file changed
memory_test.rb
@@ -3,8 +3,8 @@
3
4
class Constantized < Webmachine::Resource
5
HELLO_WORLD = "Hello World".freeze
6
- ALLOWED_METHODS = [Webmachine::GET_METHOD].freeze
7
- CONTENT_TYPES_PROVIDED = [[Webmachine::TEXT_HTML, :to_html]].freeze
+ ALLOWED_METHODS = ['GET'.freeze].freeze
+ CONTENT_TYPES_PROVIDED = [['text/html'.freeze, :to_html].freeze].freeze
8
9
def allowed_methods
10
ALLOWED_METHODS
@@ -25,10 +25,12 @@ def to_html
25
26
require 'webmachine/test'
27
session = Webmachine::Test::Session.new(Webmachine.application)
28
-
+CONSTANTIZED = '/constantized'.freeze
29
require 'memory_profiler'
30
report = MemoryProfiler.report do
31
- session.get('/constantized')
+ 5.times do
32
+ session.get(CONSTANTIZED)
33
+ end
34
end
35
36
report.pretty_print
0 commit comments