Module: RDF::Benchmark
- Defined in:
- lib/rdf/benchmark.rb,
lib/rdf/benchmark/repository.rb,
lib/rdf/benchmark/berlin_generator.rb
Defined Under Namespace
Classes: BerlinGenerator, Repository
Class Method Summary collapse
-
.benchmark!(name:) { ... } ⇒ Benchmark::Report
Benchmarks a single run of the given block (with warmup).
-
.benchmark_ips!(name:, time: 5, warmup: 2) { ... } ⇒ Benchmark::IPS::Report
Benchmarks the given block, measuring iterations per second.
Class Method Details
.benchmark!(name:) { ... } ⇒ Benchmark::Report
Benchmarks a single run of the given block (with warmup).
32 33 34 35 36 |
# File 'lib/rdf/benchmark.rb', line 32 def self.benchmark!(name:, &block) ::Benchmark.bmbm do |bm| bm.report(name, &block) end end |
.benchmark_ips!(name:, time: 5, warmup: 2) { ... } ⇒ Benchmark::IPS::Report
Benchmarks the given block, measuring iterations per second.
17 18 19 20 21 22 |
# File 'lib/rdf/benchmark.rb', line 17 def self.benchmark_ips!(name: , time: 5, warmup: 2, &block) ::Benchmark.ips do |bm| bm.config(:time => time, :warmup => warmup) bm.report(name, &block) end end |