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
grockit-thin-0.8.2 spec/perf/response_perf_spec.rb
macournoyer-thin-1.0.1 spec/perf/response_perf_spec.rb
macournoyer-thin-1.1.0 spec/perf/response_perf_spec.rb
michaelyta-thin-1.2.2 spec/perf/response_perf_spec.rb
thin-1.2.11 spec/perf/response_perf_spec.rb
thin-1.2.11-x86-mswin32 spec/perf/response_perf_spec.rb
thin-1.2.11-x86-mingw32 spec/perf/response_perf_spec.rb
thin-1.2.10 spec/perf/response_perf_spec.rb
thin-1.2.10-x86-mswin32 spec/perf/response_perf_spec.rb
thin-1.2.10-x86-mingw32 spec/perf/response_perf_spec.rb
thin-1.2.9 spec/perf/response_perf_spec.rb
thin-1.2.9-x86-mswin32 spec/perf/response_perf_spec.rb
thin-1.2.9-x86-mingw32 spec/perf/response_perf_spec.rb
thin-1.2.8 spec/perf/response_perf_spec.rb
thin-1.2.8-x86-mswin32 spec/perf/response_perf_spec.rb
thin-1.2.8-x86-mingw32 spec/perf/response_perf_spec.rb
steamcannon-thin-1.2.8 spec/perf/response_perf_spec.rb
thin-1.2.7 spec/perf/response_perf_spec.rb
thin-1.2.7-x86-mswin32 spec/perf/response_perf_spec.rb
thin-1.2.7-x86-mingw32 spec/perf/response_perf_spec.rb