Sha256: 9234dd1cb1aa843799b56e428dbdb86ed290474382a77005067843c55e70b923

Contents?: true

Size: 544 Bytes

Versions: 21

Compression:

Stored size: 544 Bytes

Contents

require 'benchmark'
require 'tmpdir'

path = File.join(Dir.tmpdir, "benchmark_example_spec.rb")

File.open(path, 'w') do |f|
  f.puts %q|describe "something" do|
  100.times do |n|
    f.puts <<-TEXT
  it "does something #{n}", :focus => true do
  end
TEXT
  end
  100.times do |n|
    f.puts <<-TEXT
  it "does something else #{n}" do
  end
TEXT
  end
  f.puts %q|end|
end

n = 1

Benchmark.benchmark do |bm|
  3.times do
    bm.report do
      n.times do
        `bin/rspec --tag focus #{path}`
      end
    end
  end
end

File.delete(path)

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
opal-rspec-1.1.0.alpha3 rspec-core/upstream/benchmarks/filter_object.rb
opal-rspec-1.1.0.alpha2 rspec-core/upstream/benchmarks/filter_object.rb
opal-rspec-1.1.0.alpha1 rspec-core/upstream/benchmarks/filter_object.rb
opal-rspec-1.0.0 rspec-core/upstream/benchmarks/filter_object.rb
opal-rspec-1.0.0.alpha1 rspec-core/upstream/benchmarks/filter_object.rb
opal-rspec-0.8.0 rspec-core/upstream/benchmarks/filter_object.rb
opal-rspec-0.8.0.alpha3 rspec-core/upstream/benchmarks/filter_object.rb
opal-rspec-0.8.0.alpha2 rspec-core/upstream/benchmarks/filter_object.rb
opal-rspec-0.8.0.alpha1 rspec-core/upstream/benchmarks/filter_object.rb
opal-rspec-0.7.1 rspec-core/upstream/benchmarks/filter_object.rb
opal-rspec-0.7.0 rspec-core/upstream/benchmarks/filter_object.rb
opal-rspec-0.6.2 rspec-core/benchmarks/filter_object.rb
opal-rspec-0.7.0.rc.2 rspec-core/upstream/benchmarks/filter_object.rb
opal-rspec-0.6.1 rspec-core/benchmarks/filter_object.rb
opal-rspec-0.6.0 rspec-core/benchmarks/filter_object.rb
opal-rspec-0.6.0.beta1 rspec-core/benchmarks/filter_object.rb
opal-connect-rspec-0.5.0 rspec-core/benchmarks/filter_object.rb
opal-rspec-0.5.0 rspec-core/benchmarks/filter_object.rb
opal-rspec-0.5.0.beta3 rspec-core/benchmarks/filter_object.rb
opal-rspec-0.5.0.beta2 rspec-core/benchmarks/filter_object.rb