Sha256: 8b294cf1cbdf46912678f25dd74fa2f8fc8cd6f6a35d77d8df4a9fefe30b3671

Contents?: true

Size: 422 Bytes

Versions: 40

Compression:

Stored size: 422 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe Response, 'performance' do
  before do
    @response = Response.new
    @response.body = ''
  end
  
  it "should be fast" do
    @response.body << <<-EOS
<html><head><title>Dir listing</title></head>
<body><h1>Listing stuff</h1><ul>
#{'<li>Hi!</li>' * 100}
</ul></body></html>
EOS

    proc { @response.each { |l| l } }.should be_faster_then(0.00011)
  end
end

Version data entries

40 entries across 40 versions & 6 rubygems

Version Path
thin-1.2.6 spec/perf/response_perf_spec.rb
thin-1.2.6-x86-mswin32 spec/perf/response_perf_spec.rb
thin-1.2.6-x86-mingw32 spec/perf/response_perf_spec.rb
middleman-0.10.17 vendor/gems/gems/thin-1.2.5/spec/perf/response_perf_spec.rb
middleman-0.10.16 vendor/gems/gems/thin-1.2.5/spec/perf/response_perf_spec.rb
middleman-0.10.15 vendor/gems/gems/thin-1.2.5/spec/perf/response_perf_spec.rb
middleman-0.10.14 vendor/gems/gems/thin-1.2.5/spec/perf/response_perf_spec.rb
thin-1.2.5 spec/perf/response_perf_spec.rb
thin-1.2.3-x86-mswin32 spec/perf/response_perf_spec.rb
thin-1.2.4-x86-mswin32 spec/perf/response_perf_spec.rb
thin-1.2.4 spec/perf/response_perf_spec.rb
thin-1.2.3 spec/perf/response_perf_spec.rb
thin-0.7.1 spec/perf/response_perf_spec.rb
thin-0.7.1-x86-mswin32-60 spec/perf/response_perf_spec.rb
thin-0.8.0 spec/perf/response_perf_spec.rb
thin-0.8.2 spec/perf/response_perf_spec.rb
thin-1.2.1 spec/perf/response_perf_spec.rb
thin-1.2.2 spec/perf/response_perf_spec.rb
thin-1.0.0 spec/perf/response_perf_spec.rb
thin-0.8.1 spec/perf/response_perf_spec.rb