Sha256: 9ef9e3ac5b91531ac6e9613c3f73cf6d5548fefb6f8fa74f73f6dfee26786054
Contents?: true
Size: 492 Bytes
Versions: 2
Compression:
Stored size: 492 Bytes
Contents
# encoding: utf-8 RSpec.describe Benchmark::Perf::Iteration do it "defines cycles per 100 microseconds" do bench = described_class.new sample = bench.run_warmup { 'x' * 1_000_000 } expect(sample).to be > 25 end it "measures 10K iterations per second" do bench = described_class.new sample = bench.run { 'x' * 1_000_000 } expect(sample.size).to eq(4) expect(sample[0]).to be > 250 expect(sample[1]).to be > 5 expect(sample[2]).to be > 250 end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
benchmark-perf-0.1.1 | spec/unit/iteration_spec.rb |
benchmark-perf-0.1.0 | spec/unit/iteration_spec.rb |