Sha256: 20e21bc3ae02ae766378090ebf7770f696b20e153e8f288e80a34a71ea054f31

Contents?: true

Size: 565 Bytes

Versions: 11

Compression:

Stored size: 565 Bytes

Contents

$:.unshift File.expand_path(File.join("..", 'lib'), File.dirname(__FILE__))

require 'traject/indexer'
require 'benchmark/ips'

require 'marc'

marc_records_iter = MARC::XMLReader.new('./topics.xml').take(500).enum_for(:cycle)

branch = ARGV[0]

indexer = Traject::Indexer.new
indexer.load_config_file('./common.rb')

puts RUBY_DESCRIPTION
puts "On branch #{branch}"

Benchmark.ips do |x|
  if defined? JRUBY_VERSION
    x.warmup = 10
  else
    x.warmup = 2
  end
  
  x.time = 50

  x.report(branch) do
    indexer.map_record(marc_records_iter.next)
  end
end



Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
traject-3.0.0.alpha.1 index_bench/index_bench.rb
traject-2.3.4-java index_bench/index_bench.rb
traject-2.3.4 index_bench/index_bench.rb
traject-2.3.3 index_bench/index_bench.rb
traject-2.3.3-java index_bench/index_bench.rb
traject-2.3.2-java index_bench/index_bench.rb
traject-2.3.2 index_bench/index_bench.rb
traject-2.3.1-java index_bench/index_bench.rb
traject-2.3.1 index_bench/index_bench.rb
traject-2.3.0-java index_bench/index_bench.rb
traject-2.3.0 index_bench/index_bench.rb